diff options
author | Petr Uzel | 2011-09-19 15:29:11 +0200 |
---|---|---|
committer | Karel Zak | 2011-09-27 15:24:00 +0200 |
commit | 26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7 (patch) | |
tree | 16c56dbdb57234fd944f4fff74734ed28bbd3692 /fdisk/sfdisk.c | |
parent | sfdisk: fix weird indentation in msdos_partition() (diff) | |
download | kernel-qcow2-util-linux-26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7.tar.gz kernel-qcow2-util-linux-26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7.tar.xz kernel-qcow2-util-linux-26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7.zip |
sfdisk: make the cylinder boundary check less fatal
If the specified format is not cylinders, make the cylinder boundary
check only print a warning and proceed anyways.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'fdisk/sfdisk.c')
-rw-r--r-- | fdisk/sfdisk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index 2c9de8f32..820e23e9c 100644 --- a/fdisk/sfdisk.c +++ b/fdisk/sfdisk.c @@ -1313,12 +1313,14 @@ partitions_ok(struct disk_desc *z) { && (p->p.start_sect >= B.cylindersize)) { my_warn(_("Warning: partition %s does not start " "at a cylinder boundary\n"), PNO(p)); - return 0; + if (specified_format == F_CYLINDER) + return 0; } if ((p->start + p->size) % B.cylindersize) { my_warn(_("Warning: partition %s does not end " "at a cylinder boundary\n"), PNO(p)); - return 0; + if (specified_format == F_CYLINDER) + return 0; } } } |