diff options
Diffstat (limited to 'src/gpt.c')
-rw-r--r-- | src/gpt.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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 (); |