diff options
author | Davidlohr Bueso | 2012-10-07 16:34:01 +0200 |
---|---|---|
committer | Karel Zak | 2012-10-18 12:16:01 +0200 |
commit | 42c384fa98d83d473f87dafef46e07b6697ccd9f (patch) | |
tree | 7c18d07833bd54554151cf9ff6ad3a88c247762e | |
parent | fdisk: api: improve some comments (diff) | |
download | kernel-qcow2-util-linux-42c384fa98d83d473f87dafef46e07b6697ccd9f.tar.gz kernel-qcow2-util-linux-42c384fa98d83d473f87dafef46e07b6697ccd9f.tar.xz kernel-qcow2-util-linux-42c384fa98d83d473f87dafef46e07b6697ccd9f.zip |
fdisk: fix segfault when printing gpt raw data
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
-rw-r--r-- | fdisks/fdisk.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c index 1295d54e7..e271ea17c 100644 --- a/fdisks/fdisk.c +++ b/fdisks/fdisk.c @@ -1389,7 +1389,8 @@ static void print_raw(struct fdisk_context *cxt) int i; printf(_("Device: %s\n"), cxt->dev_path); - if (disklabel == SUN_LABEL || disklabel == SGI_LABEL) + if (disklabel == SUN_LABEL || disklabel == SGI_LABEL || + disklabel == GPT_LABEL) print_buffer(cxt, cxt->firstsector); else for (i = 3; i < partitions; i++) print_buffer(cxt, ptes[i].sectorbuffer); |