summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2014-04-18 13:26:08 +0200
committerKarel Zak2014-04-18 13:26:08 +0200
commitdd7ba604631ce57f194f56dfb71414e42d914a21 (patch)
tree180cd564eb416092521b48da0c06c24e2a6e8de4 /disk-utils
parentnsenter: add + to getopt_long() (diff)
downloadkernel-qcow2-util-linux-dd7ba604631ce57f194f56dfb71414e42d914a21.tar.gz
kernel-qcow2-util-linux-dd7ba604631ce57f194f56dfb71414e42d914a21.tar.xz
kernel-qcow2-util-linux-dd7ba604631ce57f194f56dfb71414e42d914a21.zip
libfdisk: add partitions reorder operation to label API
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/fdisk-menu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c
index bdaa73475..4e44f0b85 100644
--- a/disk-utils/fdisk-menu.c
+++ b/disk-utils/fdisk-menu.c
@@ -102,6 +102,7 @@ struct menu menu_generic = {
MENU_XENT('d', N_("print the raw data of the first sector from the device")),
MENU_XENT('D', N_("print the raw data of the disklabel from the device")),
+ MENU_XENT('f', N_("fix partitions order")),
MENU_SEP(N_("Misc")),
MENU_BENT ('m', N_("print this menu")),
@@ -210,7 +211,6 @@ struct menu menu_dos = {
MENU_ENT('c', N_("toggle the dos compatibility flag")),
MENU_XENT('b', N_("move beginning of data in a partition")),
- MENU_XENT('f', N_("fix partition order")),
MENU_XENT('i', N_("change the disk identifier")),
MENU_XENT_NEST('M', N_("return from protective/hybrid MBR to GPT"),
@@ -482,6 +482,9 @@ static int generic_menu_cb(struct fdisk_context **cxt0,
case 'D':
dump_disklabel(cxt);
break;
+ case 'f':
+ rc = fdisk_reorder_partitions(cxt);
+ break;
case 'r':
rc = fdisk_context_enable_details(cxt, 0);
break;
@@ -658,9 +661,6 @@ static int dos_menu_cb(struct fdisk_context **cxt0,
rc = fdisk_dos_move_begin(cxt, n);
break;
}
- case 'f':
- rc = fdisk_dos_fix_order(cxt);
- break;
case 'i':
rc = fdisk_set_disklabel_id(cxt);
break;