summaryrefslogtreecommitdiff
path: root/xdriinfo.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-26 22:45:18 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-26 22:45:18 -0800
commit3bac938bf49e6e543ffeaf7bbc0e6c17f5b30416 (patch)
tree93e184a16cc8753cb25c9ab7c913c151e085451a /xdriinfo.c
parentdb27eef6c2ab78bbae9fabcccd5720d3dfef44d9 (diff)
Print which option was in error along with usage message
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xdriinfo.c')
-rw-r--r--xdriinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xdriinfo.c b/xdriinfo.c
index 865b4bf..9118ea9 100644
--- a/xdriinfo.c
+++ b/xdriinfo.c
@@ -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;
}