tools: kmod: add list command
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 23 Dec 2011 13:33:02 +0000 (11:33 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 23 Dec 2011 13:33:02 +0000 (11:33 -0200)
It's the same of lsmod since there's not much to change on its format.

tools/kmod-lsmod.c
tools/kmod.c
tools/kmod.h

index 381b720..ab0522d 100644 (file)
@@ -100,4 +100,10 @@ const struct kmod_cmd kmod_cmd_compat_lsmod = {
        .help = "compat lsmod command",
 };
 
+const struct kmod_cmd kmod_cmd_list = {
+       .name = "list",
+       .cmd = do_lsmod,
+       .help = "list currently loaded modules",
+};
+
 #endif
index 1d48b3f..b6b589a 100644 (file)
@@ -36,6 +36,7 @@ static const struct kmod_cmd kmod_cmd_help;
 
 static const struct kmod_cmd *kmod_cmds[] = {
        &kmod_cmd_help,
+       &kmod_cmd_list,
 };
 
 static const struct kmod_cmd *kmod_compat_cmds[] = {
index 5bab760..972a16c 100644 (file)
@@ -33,4 +33,5 @@ extern const struct kmod_cmd kmod_cmd_compat_insmod;
 extern const struct kmod_cmd kmod_cmd_compat_modinfo;
 extern const struct kmod_cmd kmod_cmd_compat_modprobe;
 
+extern const struct kmod_cmd kmod_cmd_list;
 #endif