libfdisk: add FDISK_LABEL_FL_REQUIRE_GEOMETRY
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
04d83a9251
commit
caad858324
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue