Moved functions used by "lsmod" from cat.c to utility.c

Adjusted to make lsmod and sh compilable as standalone apps.
Comment fixes
This commit is contained in:
Pavel Roskin
2000-07-17 20:18:42 +00:00
parent 97562bd9d7
commit cc8a66b113
6 changed files with 37 additions and 40 deletions

View File

@ -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));
}