summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2018-10-19 01:18:48 -0400
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-11-17 23:42:30 +0000
commit9fbd0e614e81d9bfb113b659fb650942baa51e37 (patch)
treeaacbe1ccd1e7ac12452894b2d664e8721162a88f
parent26af36611ed23e9fa08b2ba92053f4ad42078343 (diff)
main: reorganize usage print
Minor changes to the -h usage output. Reorder the input and the help option printing, and make the example usages use argv0. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 00857f6..f0f71ba 100644
--- a/main.c
+++ b/main.c
@@ -21,8 +21,8 @@ static void usage(const char *argv0)
fprintf(stderr, "Usage: %s [options] <uvc device>\n", argv0);
fprintf(stderr, "Available options are\n");
fprintf(stderr, " -c device V4L2 source device\n");
- fprintf(stderr, " -h Print this help screen and exit\n");
fprintf(stderr, " -i image MJPEG image\n");
+ fprintf(stderr, " -h Print this help screen and exit\n");
fprintf(stderr, "\n");
fprintf(stderr, " <uvc device> UVC device instance specifier\n");
fprintf(stderr, "\n");
@@ -38,10 +38,10 @@ static void usage(const char *argv0)
fprintf(stderr, " gadget identified will be used.\n");
fprintf(stderr, "\n");
fprintf(stderr, "Example usage:\n");
- fprintf(stderr, " uvc-gadget uvc.1\n");
- fprintf(stderr, " uvc-gadget g1/functions/uvc.1\n");
+ fprintf(stderr, " %s uvc.1\n", argv0);
+ fprintf(stderr, " %s g1/functions/uvc.1\n", argv0);
fprintf(stderr, "\n");
- fprintf(stderr, " uvc-gadget musb-hdrc.0.auto\n");
+ fprintf(stderr, " %s musb-hdrc.0.auto\n", argv0);
}
/* Necessary for and only used by signal handler. */