From: Karel Zak Date: Mon, 8 Feb 2010 16:45:42 +0000 (+0100) Subject: fdisk: don't check alignment_offset against geometry X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b9e638a0f2bd869e33ecdadab442c0a1591ecb0;p=util-linux fdisk: don't check alignment_offset against geometry The alignment_offset is compensation for DOS compatible partitioning. It usually matches with disk geometry (e.g. 63 sectors), but the offset is also exported from phy.disks to RAIDs there the geometry don't match with the offset. So.. don't print unnecessary warning. Signed-off-by: Karel Zak --- diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index cc573646..469cf0d8 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -1041,18 +1041,9 @@ get_partition_table_geometry(void) { void update_sector_offset(void) { - if (dos_compatible_flag) { - /* usually 63 sectors for classic geometry */ - sector_offset = sectors; - - /* On the disks with alignment_offset the default geo.sectors - * has to be aligned to physical block boundary. Check it! - */ - if (sectors && alignment_offset && !lba_is_aligned(sectors)) - fprintf(stderr, _( - "\nWARNING: the device provides alignment_offset, but the offset does not\n" - "match with device geometry.\n\n")); - } else { + if (dos_compatible_flag) + sector_offset = sectors; /* usually 63 sectors */ + else { /* * Align the begin of the first partition to the physical block */