diff options
| author | Paul Elder <paul.elder@ideasonboard.com> | 2018-10-19 01:18:48 -0400 | 
|---|---|---|
| committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2022-11-17 23:42:30 +0000 | 
| commit | 9fbd0e614e81d9bfb113b659fb650942baa51e37 (patch) | |
| tree | aacbe1ccd1e7ac12452894b2d664e8721162a88f | |
| parent | 26af36611ed23e9fa08b2ba92053f4ad42078343 (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.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| @@ -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. */ | 
