polciycoreutils: restorecond: wrong options should exit with non-zero error code
Instead of all calls to the usage output resulting in a 0 return code we should show the usage menu when something is wrong but we should return non-zero. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
c4f415c244
commit
e8888a7f16
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,6 @@ static void term_handler()
|
|||
static void usage(char *program)
|
||||
{
|
||||
printf("%s [-d] [-f restorecond_file ] [-u] [-v] \n", program);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void exitApp(const char *msg)
|
||||
|
@ -192,6 +191,7 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
case '?':
|
||||
usage(argv[0]);
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue