diff options
author | Karel Zak | 2010-02-09 10:32:29 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-09 10:32:29 +0100 |
commit | 1d07e336cadc6963f3d46f1db9105cda0f210321 (patch) | |
tree | 66fe1372af74e2428375f3d87e11f4ccf846b1d7 /fdisk/fdisk.c | |
parent | fdisk: don't check alignment_offset against geometry (diff) | |
download | kernel-qcow2-util-linux-1d07e336cadc6963f3d46f1db9105cda0f210321.tar.gz kernel-qcow2-util-linux-1d07e336cadc6963f3d46f1db9105cda0f210321.tar.xz kernel-qcow2-util-linux-1d07e336cadc6963f3d46f1db9105cda0f210321.zip |
fdisk: fix check_alignment()
The old version of check_alignment() does not work with extended
partitions.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r-- | fdisk/fdisk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 469cf0d80..9fd9bd9d0 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -1800,9 +1800,9 @@ static void check_consistency(struct partition *p, int partition) { } static void -check_alignment(struct partition *p, int partition) +check_alignment(unsigned long long lba, int partition) { - if (!lba_is_aligned(get_start_sect(p))) + if (!lba_is_aligned(lba)) printf(_("Partition %i does not start on optimal I/O size boundary.\n"), partition + 1); } @@ -2042,7 +2042,7 @@ list_table(int xtra) { /* type name */ (type = partition_type(p->sys_ind)) ? type : _("Unknown")); check_consistency(p, i); - check_alignment(p, i); + check_alignment(get_partition_start(pe), i); } } @@ -2077,7 +2077,7 @@ x_list_table(int extend) { (unsigned long) get_nr_sects(p), p->sys_ind); if (p->sys_ind) { check_consistency(p, i); - check_alignment(p, i); + check_alignment(get_partition_start(pe), i); } } } @@ -2155,7 +2155,7 @@ verify(void) { p = pe->part_table; if (p->sys_ind && !IS_EXTENDED (p->sys_ind)) { check_consistency(p, i); - check_alignment(p, i); + check_alignment(get_partition_start(pe), i); if (get_partition_start(pe) < first[i]) printf(_("Warning: bad start-of-data in " "partition %d\n"), i + 1); |