From 9fbd0e614e81d9bfb113b659fb650942baa51e37 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Fri, 19 Oct 2018 01:18:48 -0400 Subject: 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 Signed-off-by: Paul Elder --- main.c | 8 ++++---- 1 file 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] \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 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. */ -- cgit v1.2.3