diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-26 22:45:18 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-26 22:45:18 -0800 |
commit | 3bac938bf49e6e543ffeaf7bbc0e6c17f5b30416 (patch) | |
tree | 93e184a16cc8753cb25c9ab7c913c151e085451a | |
parent | db27eef6c2ab78bbae9fabcccd5720d3dfef44d9 (diff) |
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xdriinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -80,11 +80,15 @@ int main (int argc, char *argv[]) { func = OPTIONS; argPtr = &funcArg; } else { + fprintf (stderr, "%s: unrecognized argument '%s'\n", + argv[0], argv[i]); printUsage (); return 1; } if (argPtr) { if (++i == argc) { + fprintf (stderr, "%s: '%s' requires an argument\n", + argv[0], argv[i-1]); printUsage (); return 1; } |