From 6ae5e1e09c6abbc89365c4f6133c04ef099ff20e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 17 May 2013 15:01:31 +0200 Subject: fdisk: add bsd, dos and sgi menus Signed-off-by: Karel Zak --- fdisks/fdisk-menu.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 6 deletions(-) (limited to 'fdisks/fdisk-menu.c') diff --git a/fdisks/fdisk-menu.c b/fdisks/fdisk-menu.c index 09d5ff0c4..e6b38703f 100644 --- a/fdisks/fdisk-menu.c +++ b/fdisks/fdisk-menu.c @@ -65,16 +65,16 @@ struct menu_context { struct menu menu_generic = { /* .callback = generic_menu_cb,*/ .entries = { - MENU_XENT('d', N_("print the raw data of the first sector")), - - MENU_SEP(N_("Alter partition table")), + MENU_BSEP(N_("Generic")), MENU_ENT ('d', N_("delete a partition")), MENU_ENT ('l', N_("list known partition types")), MENU_ENT ('n', N_("add a new partition")), MENU_BENT ('p', N_("print the partition table")), - MENU_ENT ('t', N_("change a partition's system id")), + MENU_ENT ('t', N_("change a partition type")), MENU_ENT ('v', N_("verify the partition table")), + MENU_XENT('d', N_("print the raw data of the first sector")), + MENU_SEP(N_("Misc")), MENU_BENT ('m', N_("print this menu")), MENU_ENT_E('u', N_("change display/entry units"), FDISK_DISKLABEL_GPT), @@ -137,11 +137,61 @@ struct menu menu_sun = { } }; +struct menu menu_sgi = { +/* .callback = sgi_menu_cb, */ + .label = FDISK_DISKLABEL_SGI, + .entries = { + MENU_SEP(N_("SGI")), + MENU_ENT('a', N_("select bootable partition")), + MENU_ENT('b', N_("edit bootfile entry")), + MENU_ENT('c', N_("select sgi swap partition")), + { 0, NULL } + } +}; + +struct menu menu_dos = { +/* .callback = dos_menu_cb, */ + .label = FDISK_DISKLABEL_DOS, + .entries = { + MENU_BSEP(N_("DOS (MBR)")), + MENU_ENT('a', N_("toggle a bootable flag")), + MENU_ENT('b', N_("edit nested BSD disklabel")), + MENU_ENT('c', N_("toggle the dos compatibility flag")), + + MENU_XENT('b', N_("move beginning of data in a partition")), + MENU_XENT('c', N_("change number of cylinders")), MENU_XENT('e', N_("list extended partitions")), + MENU_XENT('f', N_("fix partition order")), + MENU_XENT('h', N_("change number of heads")), + MENU_XENT('i', N_("change the disk identifier")), + MENU_XENT('s', N_("change number of sectors/track")), + { 0, NULL } + } +}; + +struct menu menu_bsd = { +/* .callback = bsd_menu_cb, */ + .label = FDISK_DISKLABEL_OSF, + .entries = { + MENU_SEP(N_("BSD")), + MENU_ENT('e', N_("edit drive data")), + MENU_ENT('i', N_("install bootstrap")), + MENU_ENT('s', N_("show complete disklabel")), + MENU_ENT('w', N_("write disklabel to disk")), +#if !defined (__alpha__) + MENU_ENT('x', N_("link BSD partition to non-BSD partition")), +#endif + { 0, NULL } + } +}; + static const struct menu *menus[] = { + &menu_gpt, + &menu_sun, + &menu_sgi, + &menu_dos, + &menu_bsd, &menu_generic, &menu_createlabel, - &menu_gpt, - &menu_sun }; static const struct menu_entry *next_menu_entry( -- cgit v1.2.3-55-g7522