Fixed up lsmod so it works with my devmodules kernel driver,
and with /proc. -Erik
This commit is contained in:
parent
692a4502b0
commit
54969a1f64
@ -51,7 +51,7 @@
|
||||
//#define BB_LOGGER
|
||||
#define BB_LOGNAME
|
||||
#define BB_LS
|
||||
#define BB_LSMOD
|
||||
//#define BB_LSMOD
|
||||
//#define BB_MAKEDEVS
|
||||
#define BB_MKFS_MINIX
|
||||
//#define BB_MATH
|
||||
|
11
lsmod.c
11
lsmod.c
@ -25,13 +25,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
//#if ! defined BB_FEATURE_USE_PROCFS
|
||||
//#error Sorry, I depend on the /proc filesystem right now.
|
||||
//#endif
|
||||
|
||||
extern int lsmod_main(int argc, char **argv)
|
||||
{
|
||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
||||
char *cmd[] = { "cat", "/dev/modules", "\0" };
|
||||
#else
|
||||
#if ! defined BB_FEATURE_USE_PROCFS
|
||||
#error Sorry, I depend on the /proc filesystem right now.
|
||||
#endif
|
||||
char *cmd[] = { "cat", "/proc/modules", "\0" };
|
||||
#endif
|
||||
|
||||
exit(cat_main(3, cmd));
|
||||
}
|
||||
|
@ -25,13 +25,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
//#if ! defined BB_FEATURE_USE_PROCFS
|
||||
//#error Sorry, I depend on the /proc filesystem right now.
|
||||
//#endif
|
||||
|
||||
extern int lsmod_main(int argc, char **argv)
|
||||
{
|
||||
#if defined BB_FEATURE_USE_DEVPS_N_DEVMTAB
|
||||
char *cmd[] = { "cat", "/dev/modules", "\0" };
|
||||
#else
|
||||
#if ! defined BB_FEATURE_USE_PROCFS
|
||||
#error Sorry, I depend on the /proc filesystem right now.
|
||||
#endif
|
||||
char *cmd[] = { "cat", "/proc/modules", "\0" };
|
||||
#endif
|
||||
|
||||
exit(cat_main(3, cmd));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user