parser: exit with error on invalid arguments

The parser currently indicates that it exited successfully if invalid
arguments are passed to it, which makes it difficult to detect when
other tools are calling it incorrectly. This patch causes it to return
'1' indicating a failure.

Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Steve Beattie 2014-02-20 16:53:18 -08:00
parent ea8e02412e
commit 192ca1dc57

View file

@ -572,7 +572,7 @@ static int process_arg(int c, char *optarg)
break;
default:
display_usage(progname);
exit(0);
exit(1);
break;
}