summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-01-17 11:58:56 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2017-01-24 15:34:05 +0100
commitf4091be1d304b3ab996f7ac9f528e9a7fb9cf09b (patch)
treec59e04dd364ef0550fe689de5a796bf663a1ac47 /utils
parent9851849ae6e648df617542c22111fe542cb0fd23 (diff)
downloadrockbox-f4091be1d304b3ab996f7ac9f528e9a7fb9cf09b.tar.gz
rockbox-f4091be1d304b3ab996f7ac9f528e9a7fb9cf09b.tar.bz2
rockbox-f4091be1d304b3ab996f7ac9f528e9a7fb9cf09b.zip
hwstub: small fixes to argument processing and usage()
Change-Id: I3daa5e0c3fa2e7eab6a3d75b4c8aa66254d72f3c
Diffstat (limited to 'utils')
-rw-r--r--utils/hwstub/tools/hwstub_load.cpp9
-rw-r--r--utils/hwstub/tools/hwstub_shell.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/utils/hwstub/tools/hwstub_load.cpp b/utils/hwstub/tools/hwstub_load.cpp
index 7e79b206cb..ab9ab7b967 100644
--- a/utils/hwstub/tools/hwstub_load.cpp
+++ b/utils/hwstub/tools/hwstub_load.cpp
@@ -106,10 +106,11 @@ bool could_be_rockbox(unsigned char *buffer, size_t size)
void usage(void)
{
- printf("usage: hwstub::load [options] <addr> <file>\n");
+ printf("usage: hwstub_load [options] <addr> <file>\n");
printf("options:\n");
printf(" --help/-? Display this help\n");
printf(" --quiet/-q Quiet output\n");
+ printf(" --verbose/-v Verbose output\n");
printf(" --type/-t <t> Override file type\n");
printf(" --dev/-d <uri> Device URI (see below)\n");
printf(" --verbose/-v Display debug output\n");
@@ -140,7 +141,7 @@ int main(int argc, char **argv)
{
static struct option long_options[] =
{
- {"help", no_argument, 0, '?'},
+ {"help", no_argument, 0, 'h'},
{"quiet", no_argument, 0, 'q'},
{"type", required_argument, 0, 't'},
{"dev", required_argument, 0, 'd'},
@@ -150,7 +151,7 @@ int main(int argc, char **argv)
{0, 0, 0, 0}
};
- int c = getopt_long(argc, argv, "?qt:d:elv", long_options, NULL);
+ int c = getopt_long(argc, argv, "hqt:d:elv", long_options, NULL);
if(c == -1)
break;
switch(c)
@@ -160,7 +161,7 @@ int main(int argc, char **argv)
case 'q':
quiet = true;
break;
- case '?':
+ case 'h':
usage();
break;
case 't':
diff --git a/utils/hwstub/tools/hwstub_shell.cpp b/utils/hwstub/tools/hwstub_shell.cpp
index 336b7fed6b..347793df86 100644
--- a/utils/hwstub/tools/hwstub_shell.cpp
+++ b/utils/hwstub/tools/hwstub_shell.cpp
@@ -1299,7 +1299,7 @@ void usage(void)
printf("shell, compiled with hwstub protocol %d.%d\n",
HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR);
printf("\n");
- printf("usage: shell [options] <soc desc files>\n");
+ printf("usage: hwstub_shell [options] <soc desc files>\n");
printf("options:\n");
printf(" --help/-? Display this help\n");
printf(" --quiet/-q Quiet non-command messages\n");