summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk-menu.c
diff options
context:
space:
mode:
authorKarel Zak2013-09-03 17:36:35 +0200
committerKarel Zak2013-09-16 16:47:10 +0200
commite916600f54be606f2253a79ef4c711b1078110b5 (patch)
treef5fdc25d05e3ea0116f6bcb461690ad64670d9a3 /fdisks/fdisk-menu.c
parentlibfdisk: (gpt) support for disklabel dump (diff)
downloadkernel-qcow2-util-linux-e916600f54be606f2253a79ef4c711b1078110b5.tar.gz
kernel-qcow2-util-linux-e916600f54be606f2253a79ef4c711b1078110b5.tar.xz
kernel-qcow2-util-linux-e916600f54be606f2253a79ef4c711b1078110b5.zip
fdisk: rewrite dump first sector add dump disklabel command
Expert command (m for help): D PMBR: offset = 0, size = 512 bytes. 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 000001c0 01 00 ee fe ff ff 01 00 00 00 ff 9f 0f 00 00 00 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa GPT Header: offset = 512, size = 512 bytes. 00000200 45 46 49 20 50 41 52 54 00 00 01 00 00 02 00 00 00000210 ae 36 81 28 00 00 00 00 01 00 00 00 00 00 00 00 00000220 ff 9f 0f 00 00 00 00 00 00 08 00 00 00 00 00 00 00000230 de 9f 0f 00 00 00 00 00 e0 9d d8 d5 d6 da 1a 44 00000240 98 57 e4 11 64 88 ce 3b 02 00 00 00 00 00 00 00 00000250 80 00 00 00 80 00 00 00 4b c7 c9 54 00 00 00 00 00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * GPT Entries: offset = 1024, size = 16384 bytes. 00000400 af 3d c6 0f 83 84 72 47 8e 79 3d 69 d8 47 7d e4 00000410 bc ae 48 5e 22 e5 ca 4c aa 98 14 6d c9 1d 72 f4 00000420 00 08 00 00 00 00 00 00 de 9f 0f 00 00 00 00 00 00000430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisk-menu.c')
-rw-r--r--fdisks/fdisk-menu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fdisks/fdisk-menu.c b/fdisks/fdisk-menu.c
index 0ead2e477..e381c34f3 100644
--- a/fdisks/fdisk-menu.c
+++ b/fdisks/fdisk-menu.c
@@ -95,7 +95,8 @@ struct menu menu_generic = {
MENU_ENT ('t', N_("change a partition type")),
MENU_BENT_E('v', N_("verify the partition table"), FDISK_DISKLABEL_BSD),
- MENU_XENT('d', N_("print the raw data of the first sector")),
+ 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")),
MENU_SEP(N_("Misc")),
MENU_BENT ('m', N_("print this menu")),
@@ -435,7 +436,10 @@ static int generic_menu_cb(struct fdisk_context **cxt0,
if (ent->expert) {
switch (ent->key) {
case 'd':
- print_raw(cxt);
+ dump_firstsector(cxt);
+ break;
+ case 'D':
+ dump_disklabel(cxt);
break;
case 'r':
rc = fdisk_context_enable_details(cxt, 0);