From 2b9e638a0f2bd869e33ecdadab442c0a1591ecb0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 8 Feb 2010 17:45:42 +0100 Subject: [PATCH] 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 --- fdisk/fdisk.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index cc5736467..469cf0d80 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 */