]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools: kmod: print help message when no commands given
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 23 Dec 2011 13:35:48 +0000 (11:35 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 23 Dec 2011 13:35:48 +0000 (11:35 -0200)
tools/kmod.c

index b6b589a7fb98bf99e7940d7c0934e5552f7e8bdc..0aec4c36e89bff5fe234b36fb92b5402099bd3b9 100644 (file)
@@ -51,7 +51,7 @@ static int kmod_help(int argc, char *argv[])
 {
        size_t i;
 
-       printf("Manage kernel modules: list, load, unload, etc\n"
+       printf("kmod - Manage kernel modules: list, load, unload, etc\n"
                        "Usage:\n"
                        "\t%s [options] command [command_options]\n\n"
                        "Options:\n"
@@ -128,8 +128,8 @@ static int handle_kmod_commands(int argc, char *argv[])
 
 finish:
        if (err < 0) {
-               fputs("missing or unknown command; "
-                       "see 'kmod help' for a list of available commands\n", stderr);
+               fputs("missing or unknown command\n", stderr);
+               kmod_help(argc, argv);
        }
 
        return err;