summaryrefslogtreecommitdiff
path: root/ubi-utils/src/unubi.c
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.ibm.com>2006-12-12 09:22:48 +0100
committerFrank Haverkamp <haver@vnet.ibm.com>2006-12-12 09:22:48 +0100
commitd45b87985d5371b2e47458ee0666f7979d5a8c21 (patch)
treea394d48bdc882367e1bf408f8e51ec9936b6819c /ubi-utils/src/unubi.c
parentda59698ccf81a1df3a250edb81a91f1b8a3decf0 (diff)
[PATCH] Minor ubi utils cleanups
Remove getopt extern declarations Minor whitespace cleanups Remove incorrect program names that snuck in during getopt rewrite Change comments to match reality Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Frank Haverkamp <haver@vnet.ibm.com>
Diffstat (limited to 'ubi-utils/src/unubi.c')
-rw-r--r--ubi-utils/src/unubi.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/ubi-utils/src/unubi.c b/ubi-utils/src/unubi.c
index 0f8945f..cade1e1 100644
--- a/ubi-utils/src/unubi.c
+++ b/ubi-utils/src/unubi.c
@@ -21,6 +21,7 @@
* Drake Dowsett, dowsett@de.ibm.com
*
* 1.2 Removed argp because we want to use uClibc.
+ * 1.3 Minor cleanups
*/
/*
@@ -53,10 +54,7 @@
#define EXEC "unubi"
#define CONTACT "haver@vnet.ibm.com"
-#define VERSION "1.0"
-
-extern char *optarg;
-extern int optind;
+#define VERSION "1.3"
static char doc[] = "\nVersion: " VERSION "\n\t"
BUILD_OS" "BUILD_CPU" at "__DATE__" "__TIME__"\n"
@@ -177,12 +175,6 @@ str_to_num(char *str)
return num;
}
-
-/**
- * parses the arguments passed into the program
- * get the input argument from argp_parse, which we know is a
- * pointer to our arguments structure;
- **/
static int
parse_opt(int argc, char **argv, struct args *args)
{
@@ -225,10 +217,13 @@ parse_opt(int argc, char **argv, struct args *args)
args->vol_split = SPLIT_RAW;
break;
case '?': /* help */
- fprintf(stderr, "Usage: unubi [OPTION...] image-file\n");
+ fprintf(stderr,
+ "Usage: unubi [OPTION...] "
+ "image-file\n");
fprintf(stderr, "%s", doc);
fprintf(stderr, "%s", optionsstr);
- fprintf(stderr, "\nReport bugs to %s\n", CONTACT);
+ fprintf(stderr,
+ "\nReport bugs to %s\n", CONTACT);
exit(0);
break;
case 'J':