diff options
Diffstat (limited to 'lsmod.c')
-rw-r--r-- | lsmod.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -25,13 +25,16 @@ | |||
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | 26 | ||
27 | 27 | ||
28 | //#if ! defined BB_FEATURE_USE_PROCFS | ||
29 | //#error Sorry, I depend on the /proc filesystem right now. | ||
30 | //#endif | ||
31 | |||
32 | extern int lsmod_main(int argc, char **argv) | 28 | extern int lsmod_main(int argc, char **argv) |
33 | { | 29 | { |
30 | #if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB | ||
31 | char *cmd[] = { "cat", "/dev/modules", "\0" }; | ||
32 | #else | ||
33 | #if ! defined BB_FEATURE_USE_PROCFS | ||
34 | #error Sorry, I depend on the /proc filesystem right now. | ||
35 | #endif | ||
34 | char *cmd[] = { "cat", "/proc/modules", "\0" }; | 36 | char *cmd[] = { "cat", "/proc/modules", "\0" }; |
37 | #endif | ||
35 | 38 | ||
36 | exit(cat_main(3, cmd)); | 39 | exit(cat_main(3, cmd)); |
37 | } | 40 | } |