summaryrefslogtreecommitdiffstats
path: root/commands/lsmod.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-08-13 15:54:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2008-08-13 16:29:17 +0200
commit932b57873db47db89989b86789b216e50a753478 (patch)
tree45121689cbab9b60340f62e6148405fdbea53163 /commands/lsmod.c
parent0dd24dc17d561fa0a9f8d5b2ffb5c31e1cf7985c (diff)
downloadbarebox-932b57873db47db89989b86789b216e50a753478.tar.gz
move several commands into extra files
move false, true, help, insmod, lsmod, version into extra files Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/lsmod.c')
-rw-r--r--commands/lsmod.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/commands/lsmod.c b/commands/lsmod.c
new file mode 100644
index 0000000..9909724
--- /dev/null
+++ b/commands/lsmod.c
@@ -0,0 +1,19 @@
+#include <common.h>
+#include <command.h>
+#include <module.h>
+
+static int do_lsmod (cmd_tbl_t *cmdtp, int argc, char *argv[])
+{
+ struct module *mod;
+
+ for_each_module(mod)
+ printf("%s\n", mod->name);
+
+ return 0;
+}
+
+U_BOOT_CMD_START(lsmod)
+ .maxargs = 1,
+ .cmd = do_lsmod,
+ .usage = "list modules",
+U_BOOT_CMD_END