diff options
-rw-r--r-- | hktool.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -32,7 +32,7 @@ #define VERSION "unknown version" #endif -#define USAGE "[-hlvr] [-f file] [--] mcu" +static const char *usage = "[-hlvr] [-f file] [--] mcu"; static void help(void) { @@ -76,7 +76,7 @@ int main(int argc, char **argv) flashfile = optarg; break; case 'h': - fprintf(stderr, "Usage: %s " USAGE "\n", argv[0]); + fprintf(stderr, "Usage: %s %s\n", argv[0], usage); help(); return EXIT_SUCCESS; break; @@ -92,7 +92,7 @@ int main(int argc, char **argv) doreboot = true; break; case '?': - fprintf(stderr, "Usage: %s " USAGE "\n", argv[0]); + fprintf(stderr, "Usage: %s %s\n", argv[0], usage); return EXIT_FAILURE; break; default: @@ -101,13 +101,13 @@ int main(int argc, char **argv) } if (optind >= argc) - eprintf("No MCU specified\nUsage: %s " USAGE, argv[0]); + eprintf("No MCU specified\nUsage: %s %s", argv[0], usage); if (!doflash && !doreboot) eprintf("Nothing to do"); if (argc - optind > 1) - eprintf("Invalid number of arguments\nUsage: %s " USAGE, argv[0]); + eprintf("Invalid number of arguments\nUsage: %s %s", argv[0], usage); if (getparams(&fp, argv[optind]) != 0) return EXIT_FAILURE; |