From 3e3b51b3b137a868a181f05c51edd7e9a5304ab3 Mon Sep 17 00:00:00 2001 From: Jean-Loup 'clippix' Bogalho Date: Sat, 9 May 2015 23:15:23 +0200 Subject: 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 --- disk-utils/fdisk-menu.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'disk-utils/fdisk-menu.c') 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 */ -- cgit 1.2.3-korg