diff options
author | Francesco Cosoleto | 2011-11-09 19:04:12 +0100 |
---|---|---|
committer | Karel Zak | 2011-11-14 14:27:18 +0100 |
commit | c482303ef791590b56444723385c16d8d4be696f (patch) | |
tree | 6e11bf290a6f58d16ccbe85e8ea54948047f1c3c /fdisk/fdisk.h | |
parent | fdisk: move command prompt code to a separate function (diff) | |
download | kernel-qcow2-util-linux-c482303ef791590b56444723385c16d8d4be696f.tar.gz kernel-qcow2-util-linux-c482303ef791590b56444723385c16d8d4be696f.tar.xz kernel-qcow2-util-linux-c482303ef791590b56444723385c16d8d4be696f.zip |
fdisk: rewrite print menu system
DOS and SGI label menus are unchanged. BSD label command
descriptions change slightly to use a common form.
This also removes an useless menu entry in SUN label menu to
edit bsd disklabel.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'fdisk/fdisk.h')
-rw-r--r-- | fdisk/fdisk.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h index 0bc1289c2..81ff5a222 100644 --- a/fdisk/fdisk.h +++ b/fdisk/fdisk.h @@ -45,6 +45,11 @@ struct partition { unsigned char size4[4]; /* nr of sectors in partition */ } PACKED; +enum menutype { + MAIN_MENU, + EXPERT_MENU, +}; + enum failure {ioctl_error, unable_to_open, unable_to_read, unable_to_seek, unable_to_write}; @@ -75,6 +80,7 @@ extern struct partition *get_part_table(int); extern int valid_part_table_flag(unsigned char *b); extern unsigned int read_int(unsigned int low, unsigned int dflt, unsigned int high, unsigned int base, char *mesg); +extern void print_menu(enum menutype); extern void print_partition_size(int num, unsigned long long start, unsigned long long stop, int sysid); extern unsigned char *MBRbuffer; @@ -96,12 +102,13 @@ extern unsigned long long get_start_sect(struct partition *p); extern unsigned long long get_nr_sects(struct partition *p); enum labeltype { - DOS_LABEL, - SUN_LABEL, - SGI_LABEL, - AIX_LABEL, - OSF_LABEL, - MAC_LABEL + DOS_LABEL = 1, + SUN_LABEL = 2, + SGI_LABEL = 4, + AIX_LABEL = 8, + OSF_LABEL = 16, + MAC_LABEL = 32, + ANY_LABEL = -1 }; extern enum labeltype disklabel; |