summaryrefslogtreecommitdiffstats
path: root/commands/lsmod.c
diff options
context:
space:
mode:
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