diff options
author | Karel Zak | 2010-02-08 17:45:42 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-09 10:27:34 +0100 |
commit | 2b9e638a0f2bd869e33ecdadab442c0a1591ecb0 (patch) | |
tree | aa43b6c4485740e9b2fb20a720e21071b50cde9e /fdisk/fdisk.c | |
parent | libblkid: don't return error on empty files (diff) | |
download | kernel-qcow2-util-linux-2b9e638a0f2bd869e33ecdadab442c0a1591ecb0.tar.gz kernel-qcow2-util-linux-2b9e638a0f2bd869e33ecdadab442c0a1591ecb0.tar.xz kernel-qcow2-util-linux-2b9e638a0f2bd869e33ecdadab442c0a1591ecb0.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 15 |
1 files 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 */ |