[BusyBox-cvs] svn commit: trunk/busybox/modutils

landley at busybox.net landley at busybox.net
Wed May 4 23:55:07 UTC 2005


Author: landley
Date: 2005-05-04 17:55:06 -0600 (Wed, 04 May 2005)
New Revision: 10248

Log:
Tweak the "pretty lsmod for 2.6" patch to be seperately selectable.

Patch from Takeharu Kato.


Modified:
   trunk/busybox/modutils/Config.in
   trunk/busybox/modutils/lsmod.c


Changeset:
Modified: trunk/busybox/modutils/Config.in
===================================================================
--- trunk/busybox/modutils/Config.in	2005-05-04 02:15:23 UTC (rev 10247)
+++ trunk/busybox/modutils/Config.in	2005-05-04 23:55:06 UTC (rev 10248)
@@ -18,6 +18,13 @@
 	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 @@
 	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

Modified: trunk/busybox/modutils/lsmod.c
===================================================================
--- trunk/busybox/modutils/lsmod.c	2005-05-04 02:15:23 UTC (rev 10247)
+++ trunk/busybox/modutils/lsmod.c	2005-05-04 23:55:06 UTC (rev 10248)
@@ -164,7 +164,7 @@
 {
 	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 @@
 	  }
 	  fclose(file);
 	}
+	return 0;  /* Success  */
 #else
 	if (bb_xprint_file_by_name("/proc/modules") < 0) {
 		return 0;




More information about the busybox-cvs mailing list