1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-12-22 15:20:49 +01:00

Service command list fixup

Decode the target, no the type (and print the correct error message).

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-03-25 13:10:56 +02:00
parent a71c92b33d
commit 442ef5cedf

View file

@ -60,11 +60,11 @@ static int cmd_list(int argc, char **argv)
}
if (argc == 2) {
i = svc_type_from_string(argv[1]);
i = svc_target_from_string(argv[1]);
if (i == -1) {
fprintf(stderr, "Unknown target `%s'\n", argv[1]);
tell_read_help(argv[1]);
tell_read_help(argv[0]);
ret = EXIT_FAILURE;
goto out;
}