summaryrefslogtreecommitdiffstats
path: root/commands/lsmod.c
blob: 711c1c66dc3d2ade9ab6e6a1cba3f7df13275d7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <common.h>
#include <command.h>
#include <complete.h>
#include <module.h>

static int do_lsmod(int argc, char *argv[])
{
	struct module *mod;

	for_each_module(mod)
		printf("%s\n", mod->name);

	return 0;
}

BAREBOX_CMD_START(lsmod)
	.cmd		= do_lsmod,
	BAREBOX_CMD_DESC("list loaded barebox modules")
	BAREBOX_CMD_GROUP(CMD_GRP_MISC)
	BAREBOX_CMD_COMPLETE(empty_complete)
BAREBOX_CMD_END