]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: make the cylinder boundary check less fatal
authorPetr Uzel <petr.uzel@suse.cz>
Mon, 19 Sep 2011 13:29:11 +0000 (15:29 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 18 Oct 2011 12:22:27 +0000 (14:22 +0200)
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>
fdisk/sfdisk.c

index 81a50ee78b99ead644194ba6f6201db6b4876b1a..e27a3200860e5ba92962ef7192d6abe175ca93b0 100644 (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;
                }
            }
     }