From 252c51a996c4bcdfd2a8fb87bc508b22030d8034 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Fri, 23 Dec 2011 11:33:02 -0200 Subject: [PATCH] tools: kmod: add list command It's the same of lsmod since there's not much to change on its format. --- tools/kmod-lsmod.c | 6 ++++++ tools/kmod.c | 1 + tools/kmod.h | 1 + 3 files changed, 8 insertions(+) diff --git a/tools/kmod-lsmod.c b/tools/kmod-lsmod.c index 381b720..ab0522d 100644 --- a/tools/kmod-lsmod.c +++ b/tools/kmod-lsmod.c @@ -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 diff --git a/tools/kmod.c b/tools/kmod.c index 1d48b3f..b6b589a 100644 --- a/tools/kmod.c +++ b/tools/kmod.c @@ -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[] = { diff --git a/tools/kmod.h b/tools/kmod.h index 5bab760..972a16c 100644 --- a/tools/kmod.h +++ b/tools/kmod.h @@ -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 -- 2.7.4