diff options
| author | Jean-Loup 'clippix' Bogalho <clippix@lse.epita.fr> | 2015-05-09 23:15:23 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2015-05-11 12:26:30 +0200 |
| commit | 3e3b51b3b137a868a181f05c51edd7e9a5304ab3 (patch) | |
| tree | 028c53415707ee9b860be0ec8dd159b0adf9ba37 /disk-utils/fdisk-menu.c | |
| parent | 71af1c7239e59f11ee70b4995dab5b55b55e8f39 (diff) | |
| download | util-linux-3e3b51b3b137a868a181f05c51edd7e9a5304ab3.tar.gz | |
fdisk: add the 'i'nfo command
Add the 'i'nfo command to fdisk that prints details about a specific partition.
Details are everything the function 'fdisk_label_get_field' can return.
Signed-off-by: Jean-Loup 'clippix' Bogalho <clippix@lse.epita.fr>
Diffstat (limited to 'disk-utils/fdisk-menu.c')
| -rw-r--r-- | disk-utils/fdisk-menu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c index a77a13f80d..6c7f583207 100644 --- a/disk-utils/fdisk-menu.c +++ b/disk-utils/fdisk-menu.c @@ -99,6 +99,7 @@ struct menu menu_generic = { MENU_BENT ('p', N_("print the partition table")), MENU_ENT ('t', N_("change a partition type")), MENU_BENT_E('v', N_("verify the partition table"), FDISK_DISKLABEL_BSD), + MENU_ENT ('i', N_("print information about a partition")), 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")), @@ -557,6 +558,9 @@ static int generic_menu_cb(struct fdisk_context **cxt0, case 'v': rc = fdisk_verify_disklabel(cxt); break; + case 'i': + rc = print_partition_info(cxt); + break; } /* expert mode */ |
