summaryrefslogtreecommitdiff
path: root/lsmod.c
diff options
context:
space:
mode:
authorPavel Roskin2000-07-17 20:18:42 +0000
committerPavel Roskin2000-07-17 20:18:42 +0000
commitcc8a66b113dbdf04082b6f7c9b0b58984d433028 (patch)
tree98490b8eadc4e44b46c073fa2d21de403a2b61d4 /lsmod.c
parent97562bd9d7fe18bdc4f63e6e80bdce980416a915 (diff)
downloadbusybox-cc8a66b113dbdf04082b6f7c9b0b58984d433028.zip
busybox-cc8a66b113dbdf04082b6f7c9b0b58984d433028.tar.gz
Moved functions used by "lsmod" from cat.c to utility.c
Adjusted to make lsmod and sh compilable as standalone apps. Comment fixes
Diffstat (limited to 'lsmod.c')
-rw-r--r--lsmod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lsmod.c b/lsmod.c
index d3b1bb7..6eb9c56 100644
--- a/lsmod.c
+++ b/lsmod.c
@@ -28,13 +28,13 @@
extern int lsmod_main(int argc, char **argv)
{
#if defined BB_FEATURE_USE_DEVPS_PATCH
- char *cmd[] = { "cat", "/dev/modules", "\0" };
+ char *filename = "/dev/modules";
#else
#if ! defined BB_FEATURE_USE_PROCFS
#error Sorry, I depend on the /proc filesystem right now.
#endif
- char *cmd[] = { "cat", "/proc/modules", "\0" };
+ char *filename = "/proc/modules";
#endif
- return(cat_main(3, cmd));
+ return(print_file_by_name(filename));
}