summaryrefslogtreecommitdiffstats
path: root/fdisk/sfdisk.c
diff options
context:
space:
mode:
authorPetr Uzel2011-09-19 15:29:11 +0200
committerKarel Zak2011-09-27 15:24:00 +0200
commit26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7 (patch)
tree16c56dbdb57234fd944f4fff74734ed28bbd3692 /fdisk/sfdisk.c
parentsfdisk: fix weird indentation in msdos_partition() (diff)
downloadkernel-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.c6
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;
}
}
}