diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2015-08-02 14:27:10 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2015-09-15 22:43:32 -0500 |
commit | f7c6144dd97978b6962f6e043d376d42fb041fff (patch) | |
tree | 6b23e7327445b41634836e6951c68cba14052a68 | |
parent | 37ddf81b563a8e57a03be38ee07876b5be844ac9 (diff) |
distinguish between -h and error in process exit code
-rw-r--r-- | src/satmkboot.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/satmkboot.c b/src/satmkboot.c index 83b4f03..ffef46c 100644 --- a/src/satmkboot.c +++ b/src/satmkboot.c @@ -140,6 +140,8 @@ static void usage(const char *progname) print_symbols(stderr, width, regiondefs); fprintf(stderr, "\t%-*s%s\n", width, "-m master_stack", "Master stack address (default 0x06002000)"); fprintf(stderr, "\t%-*s%s\n", width, "-s slave_stack", "Slave stack address (default 0x06001000)"); + + exit(0); } static int process_symbols(const char *progname, char *list, size_t size, const char *arg) @@ -181,7 +183,6 @@ static int process_args(int argc, char **argv) switch (opt) { case 'h': usage(argv[0]); - return 1; case 'i': ipfile = optarg; @@ -243,9 +244,7 @@ int main(int argc, char **argv) char *ipout = ipbuf; size_t ipsize; - if (process_args(argc, argv)) { - return 1; - } + if (process_args(argc, argv)) return 1; for (int i = 0; i < 8; i++) { serialize_region_code(ipout, find_symbol(regiondefs, sysid.regions[i])); |