diff options
author | Frank Haverkamp <haver@vnet.ibm.com> | 2006-12-11 14:34:23 +0100 |
---|---|---|
committer | Frank Haverkamp <haver@vnet.ibm.com> | 2006-12-11 14:34:23 +0100 |
commit | 1fea122705bfecebf38e57774762663b7cd913d2 (patch) | |
tree | c4ec84f253d1dda879ca08a45997e9d8f93cb191 /ubi-utils/src/pfiflash.c | |
parent | 084fb764956460b5e67865b6072ea9cc4a2b5af9 (diff) |
[MTD] UBI Utils: Fix pfiflash
Various little fixes including some whitespace fixups.
Signed-off-by: Frank Haverkamp <haver@vnet.ibm.com>
Diffstat (limited to 'ubi-utils/src/pfiflash.c')
-rw-r--r-- | ubi-utils/src/pfiflash.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/ubi-utils/src/pfiflash.c b/ubi-utils/src/pfiflash.c index c654be9..259a647 100644 --- a/ubi-utils/src/pfiflash.c +++ b/ubi-utils/src/pfiflash.c @@ -23,6 +23,8 @@ * update using PFI files. * * 1.1 fixed output to stderr and stdout in logfile mode. + * 1.2 updated. + * 1.3 removed argp parsing to be able to use uClib. */ #include <unistd.h> @@ -39,7 +41,7 @@ #include "error.h" #include "config.h" -#define PROGRAM_VERSION "1.2" +#define PROGRAM_VERSION "1.3" extern char *optarg; extern int optind; @@ -141,7 +143,8 @@ parse_opt(int argc, char **argv, myargs *args) while (1) { int key; - key = getopt_long(argc, argv, "cl:vCp:r:s:?V", long_options, NULL); + key = getopt_long(argc, argv, "cl:vCp:r:s:?V", + long_options, NULL); if (key == -1) break; @@ -165,15 +168,17 @@ parse_opt(int argc, char **argv, myargs *args) args->pdd_handling = get_pdd_handling(optarg); if ((int)args->pdd_handling < 0) { err_quit("Unknown PDD handling: %s.\n" - "Please use either 'keep', 'merge' or" - "'overwrite'.\n'"); + "Please use either " + "'keep', 'merge' or" + "'overwrite'.\n'"); } break; case 's': args->seqnum = get_update_seqnum(optarg); if (args->seqnum < 0) { err_quit("Unsupported side: %s.\n" - "Supported sides are '0' and '1'\n", optarg); + "Supported sides are '0' " + "and '1'\n", optarg); } break; case 'r': @@ -183,7 +188,8 @@ parse_opt(int argc, char **argv, myargs *args) err_msg("Usage: pfiflash [OPTION...] [pfifile]"); err_msg("%s", doc); err_msg("%s", optionsstr); - err_msg("\nReport bugs to %s\n", PACKAGE_BUGREPORT); + err_msg("\nReport bugs to %s\n", + PACKAGE_BUGREPORT); exit(0); break; case 'V': @@ -200,7 +206,8 @@ parse_opt(int argc, char **argv, myargs *args) if (optind < argc) { args->fp_in = fopen(argv[optind++], "r"); if ((args->fp_in) == NULL) { - err_sys("Cannot open PFI file %s for input", argv[optind]); + err_sys("Cannot open PFI file %s for input", + argv[optind]); } } |