]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
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 381b720f46bc3437bf35cff216cdd4d9d92dd5f6..ab0522d93dc46192a962217fae5d01888cb0658e 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 1d48b3f8ba66dc6e5487f6aeee832badfba3aa13..b6b589a7fb98bf99e7940d7c0934e5552f7e8bdc 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 5bab76035e18e3c4737127187ccf5bcb6040c2ce..972a16c1a83291eded76d80d49cd204e5feb582f 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