]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
cfdisk: remove [Load] from menu
authorKarel Zak <kzak@redhat.com>
Thu, 13 Nov 2014 10:19:58 +0000 (11:19 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 13 Nov 2014 10:19:58 +0000 (11:19 +0100)
This functionality will be rarely used, so it does not make sense to
waste screen space with this menu item. It's enough to provide this
functionality in "Select label type" dialog (cfdisk --zero and then
'L' command).

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/cfdisk.8
disk-utils/cfdisk.c
disk-utils/fdisk-menu.c

index ab51757796d3ac4248880bdf41ad13832938a97a..6da8f431b5f0dfdde6e8d0fd376e6e374d1cdcf9 100644 (file)
@@ -66,7 +66,9 @@ Display version information and exit.
 .BR \-z , " \-\-zero"
 Start with an in-memory zeroed partition table.  This option does not zero the
 partition table on the disk; rather, it simply starts the program without
-reading the existing partition table.
+reading the existing partition table.  This option allows to a create new
+partition table from scratch or create a new partition table according to
+a sfdisk compatible script.
 
 .SH COMMANDS
 The commands for
@@ -105,18 +107,16 @@ MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB
 Quit the program.  This will exit the program without writing any data to
 the disk.
 .TP
-.B l
-Load sfdisk compatible script file and create a new (in-memory) disk label 
-according to the script, and then it is possible to modify the
-partition table before you write it to the device.
-.TP
 .B u
 Dump the current in-memory partition table to the sfdisk compatible file.
-to the script file by command 'O'.
 .sp
 The script files are compatible between cfdisk, sfdisk, fdisk and another
 libfdisk applications. For more details see
 .BR sfdisk (8).
+.sp
+It is also possible to load sfdisk script to cfdisk if there is no partition
+table on the device or when you start cfdisk with \fI--zero\fR command line
+option.
 .TP
 .B t
 Change the partition type.  By default, new partitions are created as
index f3e93b2202aa6d2908e7b3f9d46ccc1b933e4592..d7f116a1e06ea9dcce87db10c74e822f9f35f76c 100644 (file)
@@ -159,7 +159,6 @@ static struct cfdisk_menuitem main_menuitems[] = {
        { 'h', N_("Help"), N_("Print help screen") },
        { 's', N_("Sort"), N_("Fix partitions order") },
        { 'W', N_("Write"), N_("Write partition table to disk (this might destroy data)") },
-       { 'l', N_("Load"), N_("Load disk layout from sfdisk compatible script file") },
        { 'u', N_("Dump"), N_("Dump partition table to sfdisk compatible script file") },
        { 0, NULL, NULL }
 };
@@ -1771,7 +1770,6 @@ static int ui_help(void)
                N_("  b          Toggle bootable flag of the current partition"),
                N_("  d          Delete the current partition"),
                N_("  h          Print this screen"),
-               N_("  l          Load disk layout from sfdisk compatible script file"), 
                N_("  n          Create new partition from free space"),
                N_("  q          Quit program without writing partition table"),
                N_("  t          Change the partition type"),
@@ -1953,17 +1951,6 @@ static int main_menu_action(struct cfdisk *cf, int key)
                        ref = 1;
                }
                break;
-       case 'l':
-               rc = ui_script_read(cf);
-               if (rc == 0) {
-                       info = _("Script file successfully applied.");
-                       ref = 1;
-               } else if (rc != CFDISK_ERR_ESC) {
-                       refresh();
-                       sleep(2);
-                       warn = _("Failed to read script file");
-               }
-               break;
        case 'u':
                rc = ui_script_write(cf);
                if (rc == 0)
index bea6ab3579e7df82a7c1b0f78e7bc930f9ff86f2..8afdf69085a1b6753efead2ec20f9e374913ceee 100644 (file)
@@ -110,8 +110,8 @@ struct menu menu_generic = {
                MENU_ENT_E('x', N_("extra functionality (experts only)"), FDISK_DISKLABEL_BSD),
 
                MENU_SEP(N_("Script")),
-               MENU_ENT  ('I', N_("load disk layout from fdisk script file")),
-               MENU_ENT  ('O', N_("dump disk layout to fdisk script file")),
+               MENU_ENT  ('I', N_("load disk layout from sfdisk script file")),
+               MENU_ENT  ('O', N_("dump disk layout to sfdisk script file")),
 
                MENU_BSEP(N_("Save & Exit")),
                MENU_ENT_E('w', N_("write table to disk and exit"), FDISK_DISKLABEL_BSD),