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>
This commit is contained in:
Karel Zak 2010-02-08 17:45:42 +01:00
parent 88923b0889
commit 2b9e638a0f
1 changed files with 3 additions and 12 deletions

View 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
*/