diff options
Diffstat (limited to 'src/gpt.c')
-rw-r--r-- | src/gpt.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -6,10 +6,13 @@ * */ -static char rcsid[] = "$Id: gpt.c,v 1.22 2012/03/11 11:31:24 james Exp $"; +static char rcsid[] = "$Id: gpt.c,v 1.23 2012/09/10 08:28:35 james Exp $"; /* * $Log: gpt.c,v $ + * Revision 1.23 2012/09/10 08:28:35 james + * *** empty log message *** + * * Revision 1.22 2012/03/11 11:31:24 james * *** empty log message *** * @@ -106,7 +109,10 @@ usage (void) " type or a hexadecimal GUID\n" "gpt -d disk-device -c fill the PMBR with entries taken from\n" " the first few GPT entries, using dark\n" - " voodoo\n"); + " voodoo\n" + "gpt -d disk-device -q read the first GPT, repair it and write the alternate GPT\n" + "gpt -d disk-device -Q print commands which will re-create the parition table\n" + "gpt -d disk-device -C test partition table and give result in exit code\n"); exit (1); } @@ -127,7 +133,7 @@ main (int argc, char *argv[]) fprintf (stderr, "sizeof(off_t)=%d\n", sizeof (off_t)); - while ((c = getopt (argc, argv, "Cqd:hlsef:g:unac")) != EOF) + while ((c = getopt (argc, argv, "CQqd:hlsef:g:unac")) != EOF) { switch (c) { @@ -190,6 +196,11 @@ main (int argc, char *argv[]) fixup (d); disk_reread_kernel_table (d); return 0; + case 'Q': + if (!d) + usage(); + dump_out(d); + return 0; case 'n': if (!d) usage (); |