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:
Eric Paris 2012-06-04 16:31:54 -04:00
parent c4f415c244
commit e8888a7f16

View file

@ -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);
}
}