diff options
author | james <james> | 2012-03-11 10:52:06 +0000 |
---|---|---|
committer | james <james> | 2012-03-11 10:52:06 +0000 |
commit | 65cf7e27d9197fd7e1ade39f713a80499b98ede7 (patch) | |
tree | 31ebcf1b9e830946fb982141c1e74498d83fafe2 /src/gpt.c | |
parent | 5eca00f7b8db381ce2584736e3589bec47e1d46f (diff) | |
download | gpt-65cf7e27d9197fd7e1ade39f713a80499b98ede7.tar.gz gpt-65cf7e27d9197fd7e1ade39f713a80499b98ede7.tar.bz2 gpt-65cf7e27d9197fd7e1ade39f713a80499b98ede7.zip |
*** empty log message ***
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 (); |