tools: print an error if the command is unknown

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-19 12:18:50 +10:00
parent d48fecf550
commit f9a6b5ff3c

View File

@@ -228,9 +228,13 @@ main(int argc, char **argv)
* getopt(3) */
optind = 0;
rc = (*cmd)->cmd(ratbag, flags, argc, argv);
break;
goto out;
}
fprintf(stderr, "Invalid command '%s'\n", command);
usage();
rc = 1;
out:
ratbag_unref(ratbag);