]> err.no Git - util-linux/commitdiff
fdisk: don't check alignment_offset against geometry
authorKarel Zak <kzak@redhat.com>
Mon, 8 Feb 2010 16:45:42 +0000 (17:45 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 16 Feb 2010 08:58:57 +0000 (09:58 +0100)
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 <kzak@redhat.com>
fdisk/fdisk.c

index cc5736467c88689c2190fbb51ee61496f67de2fb..469cf0d80e4966f1b3e3838a4647e4771947a5e8 100644 (file)
@@ -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
                 */