Adds an options (l) to the GPT menu to resize the GPT. --- disk-utils/fdisk-menu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c index b099cc3..21cde24 100644 --- a/disk-utils/fdisk-menu.c +++ b/disk-utils/fdisk-menu.c @@ -165,6 +165,7 @@ struct menu menu_gpt = { MENU_XENT('i', N_("change disk GUID")), MENU_XENT('n', N_("change partition name")), MENU_XENT('u', N_("change partition UUID")), + MENU_XENT('l', N_("change table length")), MENU_XENT('M', N_("enter protective/hybrid MBR")), MENU_XSEP(""), @@ -691,6 +692,7 @@ static int gpt_menu_cb(struct fdisk_context **cxt0, struct fdisk_partition *pa = NULL; size_t n; int rc = 0; + unsigned long length; assert(cxt); assert(ent); @@ -702,6 +704,12 @@ static int gpt_menu_cb(struct fdisk_context **cxt0, switch (ent->key) { case 'i': return fdisk_set_disklabel_id(cxt); + case 'l': + rc = fdisk_ask_number(cxt, 1, fdisk_get_disklabel_length(cxt), + ~0UL, _("New maximum entries"), &length); + if (rc) + return rc; + return fdisk_set_disklabel_length(cxt, length); case 'M': mbr = fdisk_new_nested_context(cxt, "dos"); if (!mbr) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html