aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorproski <proski@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-17 20:18:42 +0000
committerproski <proski@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-17 20:18:42 +0000
commit9602aae15181429b0b99af5561c731932b6e57ed (patch)
tree98490b8eadc4e44b46c073fa2d21de403a2b61d4 /modutils
parentc56c347d6d5e93e518d5f72fa7310d9e4279dcfb (diff)
downloadbusybox-w32-9602aae15181429b0b99af5561c731932b6e57ed.tar.gz
busybox-w32-9602aae15181429b0b99af5561c731932b6e57ed.tar.bz2
busybox-w32-9602aae15181429b0b99af5561c731932b6e57ed.zip
Moved functions used by "lsmod" from cat.c to utility.c
Adjusted to make lsmod and sh compilable as standalone apps. Comment fixes git-svn-id: svn://busybox.net/trunk/busybox@870 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils')
-rw-r--r--modutils/lsmod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index d3b1bb79e..6eb9c56b8 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -28,13 +28,13 @@
28extern int lsmod_main(int argc, char **argv) 28extern int lsmod_main(int argc, char **argv)
29{ 29{
30#if defined BB_FEATURE_USE_DEVPS_PATCH 30#if defined BB_FEATURE_USE_DEVPS_PATCH
31 char *cmd[] = { "cat", "/dev/modules", "\0" }; 31 char *filename = "/dev/modules";
32#else 32#else
33#if ! defined BB_FEATURE_USE_PROCFS 33#if ! defined BB_FEATURE_USE_PROCFS
34#error Sorry, I depend on the /proc filesystem right now. 34#error Sorry, I depend on the /proc filesystem right now.
35#endif 35#endif
36 char *cmd[] = { "cat", "/proc/modules", "\0" }; 36 char *filename = "/proc/modules";
37#endif 37#endif
38 38
39 return(cat_main(3, cmd)); 39 return(print_file_by_name(filename));
40} 40}