test: make test-udev accept only check when argc == 2

Follow-up for 110a13202e.
This commit is contained in:
Yu Watanabe 2018-11-12 13:20:20 +09:00
parent bf877a54c7
commit acc1bc9918
1 changed files with 7 additions and 1 deletions

View File

@ -69,8 +69,14 @@ int main(int argc, char *argv[]) {
if (fake_filesystems() < 0)
return EXIT_FAILURE;
if (argc == 2)
if (argc == 2) {
if (!streq(argv[1], "check")) {
log_error("Unknown argument: %s", argv[1]);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
log_debug("version %s", PACKAGE_VERSION);
mac_selinux_init();