From: Petr Uzel Date: Mon, 19 Sep 2011 13:29:11 +0000 (+0200) Subject: sfdisk: make the cylinder boundary check less fatal X-Git-Tag: v2.21-rc1~381 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26f0feac990cbd93d3f3b903bb4c9376ae8cb5f7;p=thirdparty%2Futil-linux.git 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 --- diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c index 2c9de8f325..820e23e9cf 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; } } }