]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: add FDISK_LABEL_FL_REQUIRE_GEOMETRY
authorKarel Zak <kzak@redhat.com>
Fri, 14 Jun 2013 12:33:51 +0000 (14:33 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:47:01 +0000 (16:47 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/fdiskbsdlabel.c
fdisks/fdiskdoslabel.c
libfdisk/src/fdiskP.h
libfdisk/src/label.c
libfdisk/src/sgi.c
libfdisk/src/sun.c

index 8f891b0da41c5ffa6ff34de5aa1ad040d40c5030..23772673bfab0b9249bfc4015dab876285e77200 100644 (file)
@@ -1062,8 +1062,8 @@ struct fdisk_label *fdisk_new_bsd_label(struct fdisk_context *cxt)
        lb->parttypes = xbsd_fstypes;
        lb->nparttypes = ARRAY_SIZE(xbsd_fstypes);
 
-       /* don't ask for partition number for op->part_add() */
-       lb->flags = FDISK_LABEL_FL_ADDPART_NOPARTNO;
+       lb->flags |= FDISK_LABEL_FL_ADDPART_NOPARTNO;
+       lb->flags |= FDISK_LABEL_FL_REQUIRE_GEOMETRY;
 
        return lb;
 }
index 4b0a5cb4bc095a5bc0f791f67f298cb0cec8bb07..361d599014df774a5f8594c5ac3f03e3968013f3 100644 (file)
@@ -1561,8 +1561,8 @@ struct fdisk_label *fdisk_new_dos_label(struct fdisk_context *cxt)
        lb->parttypes = dos_parttypes;
        lb->nparttypes = ARRAY_SIZE(dos_parttypes);
 
-       /* don't ask for partition number for op->part_add() */
-       lb->flags = FDISK_LABEL_FL_ADDPART_NOPARTNO;
+       lb->flags |= FDISK_LABEL_FL_ADDPART_NOPARTNO;
+       lb->flags |= FDISK_LABEL_FL_REQUIRE_GEOMETRY;
 
        return lb;
 }
index adaa7c0e748d6cdb9a7e6e2e8d5b7e3b552913f3..d20154b802f4222de952b294fb5ab53a82533ef8 100644 (file)
@@ -202,7 +202,8 @@ struct fdisk_label {
 
 /* label driver flags */
 enum {
-       FDISK_LABEL_FL_ADDPART_NOPARTNO = (1 << 1)
+       FDISK_LABEL_FL_ADDPART_NOPARTNO = (1 << 1),
+       FDISK_LABEL_FL_REQUIRE_GEOMETRY = (1 << 2)
 };
 
 /* label allocators */
index cabf3d751af86b8c80dad15bc5b1488b0cf2dae6..6c90e993014655f0a7a30e2204a93adc2277b77c 100644 (file)
@@ -121,7 +121,7 @@ int fdisk_list_disklabel(struct fdisk_context *cxt)
  * @cxt: fdisk context
  * @t: partition type to create or NULL for label-specific default
  *
- * Creates a new partition, with number @partnum and type @parttype.
+ * Creates a new partition with type @parttype.
  *
  * Returns 0.
  */
index d16691aa8930f6d5224a1afcf180f72037153d46..32a531c58d7b30d6ae739a40015d29a558ce2b74 100644 (file)
@@ -1178,5 +1178,7 @@ struct fdisk_label *fdisk_new_sgi_label(struct fdisk_context *cxt)
        lb->parttypes = sgi_parttypes;
        lb->nparttypes = ARRAY_SIZE(sgi_parttypes);
 
+       lb->flags |= FDISK_LABEL_FL_REQUIRE_GEOMETRY;
+
        return lb;
 }
index a8d200fb285e211a777630648b7a01ef3e5b067a..eb1ba74a4eb9a4ec89449cfebbabab9d16d7d3c5 100644 (file)
@@ -1011,5 +1011,7 @@ struct fdisk_label *fdisk_new_sun_label(struct fdisk_context *cxt)
        lb->parttypes = sun_parttypes;
        lb->nparttypes = ARRAY_SIZE(sun_parttypes);
 
+       lb->flags |= FDISK_LABEL_FL_REQUIRE_GEOMETRY;
+
        return lb;
 }