From 54969a1f6443b98c6874bd611de89b9ce30ca116 Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Wed, 8 Mar 2000 06:42:34 +0000 Subject: Fixed up lsmod so it works with my devmodules kernel driver, and with /proc. -Erik --- modutils/lsmod.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modutils') diff --git a/modutils/lsmod.c b/modutils/lsmod.c index b0b37bdd7..b8834d304 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -25,13 +25,16 @@ #include -//#if ! defined BB_FEATURE_USE_PROCFS -//#error Sorry, I depend on the /proc filesystem right now. -//#endif - extern int lsmod_main(int argc, char **argv) { +#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB + char *cmd[] = { "cat", "/dev/modules", "\0" }; +#else +#if ! defined BB_FEATURE_USE_PROCFS +#error Sorry, I depend on the /proc filesystem right now. +#endif char *cmd[] = { "cat", "/proc/modules", "\0" }; +#endif exit(cat_main(3, cmd)); } -- cgit v1.2.3