From 65cf7e27d9197fd7e1ade39f713a80499b98ede7 Mon Sep 17 00:00:00 2001 From: james Date: Sun, 11 Mar 2012 10:52:06 +0000 Subject: *** empty log message *** --- src/gpt.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gpt.c b/src/gpt.c index 990d180..119f66b 100644 --- a/src/gpt.c +++ b/src/gpt.c @@ -6,10 +6,13 @@ * */ -static char rcsid[] = "$Id: gpt.c,v 1.17 2011/08/07 11:33:43 james Exp $"; +static char rcsid[] = "$Id: gpt.c,v 1.18 2012/03/11 10:52:06 james Exp $"; /* * $Log: gpt.c,v $ + * Revision 1.18 2012/03/11 10:52:06 james + * *** empty log message *** + * * Revision 1.17 2011/08/07 11:33:43 james * add support for repairing half a table * @@ -80,9 +83,10 @@ usage (void) " the last addressable sector on the disk\n" #endif "gpt -d disk-device -e print the address of the last sector\n" - " usable in a partition\n" + " usable as a partition\n" "gpt -d disk-device -f n print the lba of the last sector in\n" " parition n\n" + "gpt -d disk-device -g n print the partition type of partition n\n" "gpt -d disk-device -n write a new blank parition table to the disk\n" " the end of parition n\n" "gpt -d disk-device -a n name type start end [partition-guid]\n" @@ -147,6 +151,12 @@ main (int argc, char *argv[]) e = entry_read (d, &h.header, n); printf ("%lld\n", e.end); return 0; + case 'g': + h = headers_get (d); + n = atoi (optarg); + e = entry_read (d, &h.header, n); + printf ("%s\n", guid_to_a(e.type)); + return 0; case 'q': if (!d) usage (); -- cgit v1.2.3