svn commit: [25648] trunk/busybox/modutils

vda at busybox.net vda at busybox.net
Fri Mar 13 23:43:26 UTC 2009


Author: vda
Date: 2009-03-13 23:43:26 +0000 (Fri, 13 Mar 2009)
New Revision: 25648

Log:
insmod/modprobe: do not pass NULL to kernel as module parameter



Modified:
   trunk/busybox/modutils/modutils.c


Changeset:
Modified: trunk/busybox/modutils/modutils.c
===================================================================
--- trunk/busybox/modutils/modutils.c	2009-03-13 19:57:44 UTC (rev 25647)
+++ trunk/busybox/modutils/modutils.c	2009-03-13 23:43:26 UTC (rev 25648)
@@ -115,6 +115,9 @@
 	char *image;
 	int rc = ENOENT;
 
+	if (!options)
+		options = "";
+
 #if ENABLE_FEATURE_2_4_MODULES
 	if (get_linux_version_code() < KERNEL_VERSION(2,6,0))
 		return bb_init_module_24(filename, options);
@@ -123,10 +126,9 @@
 	/* Use the 2.6 way */
 	image = xmalloc_open_zipped_read_close(filename, &len);
 	if (image) {
+		rc = 0;
 		if (init_module(image, len, options) != 0)
 			rc = errno;
-		else
-			rc = 0;
 		free(image);
 	}
 



More information about the busybox-cvs mailing list