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>
This commit is contained in:
Petr Uzel 2011-09-19 15:29:11 +02:00 committed by Karel Zak
parent bb92c8ea2d
commit 26f0feac99
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}
}
}