From 9602aae15181429b0b99af5561c731932b6e57ed Mon Sep 17 00:00:00 2001 From: proski Date: Mon, 17 Jul 2000 20:18:42 +0000 Subject: 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 --- modutils/lsmod.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modutils') 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 @@ 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)); } -- cgit v1.2.3-55-g6feb