aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpt.c
diff options
context:
space:
mode:
authorjames <james>2011-08-07 11:33:43 +0000
committerjames <james>2011-08-07 11:33:43 +0000
commit5eca00f7b8db381ce2584736e3589bec47e1d46f (patch)
tree6fbe1673e67e5759be56b4d8b263d0a5a4075e44 /src/gpt.c
parente2d7e909efa62075d6322df2427b03f4d2ba7024 (diff)
downloadgpt-5eca00f7b8db381ce2584736e3589bec47e1d46f.tar.gz
gpt-5eca00f7b8db381ce2584736e3589bec47e1d46f.tar.bz2
gpt-5eca00f7b8db381ce2584736e3589bec47e1d46f.zip
add support for repairing half a table
Diffstat (limited to 'src/gpt.c')
-rw-r--r--src/gpt.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpt.c b/src/gpt.c
index 73bf825..990d180 100644
--- a/src/gpt.c
+++ b/src/gpt.c
@@ -6,10 +6,13 @@
*
*/
-static char rcsid[] = "$Id: gpt.c,v 1.16 2009/05/06 01:35:00 james Exp $";
+static char rcsid[] = "$Id: gpt.c,v 1.17 2011/08/07 11:33:43 james Exp $";
/*
* $Log: gpt.c,v $
+ * Revision 1.17 2011/08/07 11:33:43 james
+ * add support for repairing half a table
+ *
* Revision 1.16 2009/05/06 01:35:00 james
* *** empty log message ***
*
@@ -107,7 +110,7 @@ main (int argc, char *argv[])
fprintf (stderr, "sizeof(off_t)=%d\n", sizeof (off_t));
- while ((c = getopt (argc, argv, "d:hlsef:unac")) != EOF)
+ while ((c = getopt (argc, argv, "qd:hlsef:unac")) != EOF)
{
switch (c)
{
@@ -144,6 +147,12 @@ main (int argc, char *argv[])
e = entry_read (d, &h.header, n);
printf ("%lld\n", e.end);
return 0;
+ case 'q':
+ if (!d)
+ usage ();
+ fixup (d);
+ disk_reread_kernel_table (d);
+ return 0;
case 'n':
if (!d)
usage ();