From 41d5d2834b61b1cf23b8cc4ec86348c57ace34fe Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 13 Sep 2009 20:12:51 -0400 Subject: add detection for unrecognized plugin commands --- wrapper/runcom.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wrapper/runcom.c') diff --git a/wrapper/runcom.c b/wrapper/runcom.c index dd843dc..0e8dad8 100644 --- a/wrapper/runcom.c +++ b/wrapper/runcom.c @@ -37,6 +37,9 @@ main ( int argc, char *argv[] ) if (argc > 1) { struct plugin_command_list *list; list=plugin_find_commands(plugins,argv[1]); + if (list==NULL) + error(EXIT_FAILURE,0,"unrecognized command `%s'", + argv[1]); struct plugin_command *root; root=plugin_depend_list(list,plugins); plugin_free_list(list); -- cgit v1.2.3-2-g168b