aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpt.c')
-rw-r--r--src/gpt.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gpt.c b/src/gpt.c
index b15f5be..20bb552 100644
--- a/src/gpt.c
+++ b/src/gpt.c
@@ -6,10 +6,13 @@
*
*/
-static char rcsid[] = "$Id: gpt.c,v 1.14 2008/01/25 03:01:06 james Exp $";
+static char rcsid[] = "$Id: gpt.c,v 1.15 2009/05/06 01:12:55 james Exp $";
/*
* $Log: gpt.c,v $
+ * Revision 1.15 2009/05/06 01:12:55 james
+ * *** empty log message ***
+ *
* Revision 1.14 2008/01/25 03:01:06 james
* *** empty log message ***
*
@@ -75,7 +78,7 @@ usage (void)
" parition 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\n"
+ "gpt -d disk-device -a n name type start end [partition-guid]\n"
" set partiton n, type can either be a named\n"
" type or a hexadecimal GUID\n"
"gpt -d disk-device -c fill the PMBR with entries taken from\n"
@@ -98,7 +101,7 @@ main (int argc, char *argv[])
extern char *optarg;
extern int optind;
- fprintf(stderr,"sizeof(off_t)=%d\n",sizeof(off_t));
+ fprintf (stderr, "sizeof(off_t)=%d\n", sizeof (off_t));
while ((c = getopt (argc, argv, "d:hlsef:unac")) != EOF)
{
@@ -168,7 +171,7 @@ main (int argc, char *argv[])
if (!d)
usage ();
- if ((argc - optind) != 5)
+ if (((argc - optind) != 5) && ((argc - optind) != 6))
usage ();
start_lba = strtoll (argv[optind + 3], NULL, 0);
@@ -177,7 +180,8 @@ main (int argc, char *argv[])
n = atoi (argv[optind]);
- modify (d, n, argv[optind + 1], argv[optind + 2], start_lba, end_lba);
+ modify (d, n, argv[optind + 1], argv[optind + 2], start_lba, end_lba,
+ ((argc - optind) == 6) ? argv[optind + 5] : NULL);
show (d);
disk_reread_kernel_table (d);