summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-05-04 23:55:06 +0000
committerRob Landley <rob@landley.net>2005-05-04 23:55:06 +0000
commit4f65360a5f36e1841b13dc50108c290010347e7f (patch)
treeff4252a2dc6d31f7a8d1785043967757bd26dd58
parent918f2ab3d794172fcc089be3c3f4b0fe71537652 (diff)
Tweak the "pretty lsmod for 2.6" patch to be seperately selectable.
Patch from Takeharu Kato.
-rw-r--r--modutils/Config.in16
-rw-r--r--modutils/lsmod.c3
2 files changed, 14 insertions, 5 deletions
diff --git a/modutils/Config.in b/modutils/Config.in
index 81214f73a..986b65c6a 100644
--- a/modutils/Config.in
+++ b/modutils/Config.in
@@ -18,6 +18,13 @@ config CONFIG_FEATURE_2_4_MODULES
help
Support module loading for 2.2.x and 2.4.x Linux kernels.
+config CONFIG_FEATURE_2_6_MODULES
+ bool " Support version 2.6.x Linux kernels"
+ default n
+ depends on CONFIG_INSMOD
+ help
+ Support module loading for newer 2.6.x Linux kernels.
+
config CONFIG_FEATURE_INSMOD_VERSION_CHECKING
bool " Module version checking"
default n
@@ -73,12 +80,13 @@ config CONFIG_LSMOD
help
lsmod is used to display a list of loaded modules.
-config CONFIG_FEATURE_2_6_MODULES
- bool " Support version 2.6.x Linux kernels"
+config CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
+ bool " lsmod pretty output for 2.6.x Linux kernels "
default n
- depends on CONFIG_INSMOD || CONFIG_LSMOD
+ depends on CONFIG_LSMOD
help
- Support module loading for newer 2.6.x Linux kernels.
+ This option makes output format of lsmod adjusted to
+ the format of module-init-tools for Linux kernel 2.6.
config CONFIG_FEATURE_QUERY_MODULE_INTERFACE
bool
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 525fc2dc2..f2ee19f8f 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -164,7 +164,7 @@ extern int lsmod_main(int argc, char **argv)
{
printf("Module Size Used by");
check_tainted();
-#if defined(CONFIG_FEATURE_2_6_MODULES)
+#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT)
{
FILE *file;
char line[4096];
@@ -204,6 +204,7 @@ extern int lsmod_main(int argc, char **argv)
}
fclose(file);
}
+ return 0; /* Success */
#else
if (bb_xprint_file_by_name("/proc/modules") < 0) {
return 0;