aboutsummaryrefslogtreecommitdiff
path: root/modutils/modutils.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-13 23:43:26 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-13 23:43:26 +0000
commit3b5c9b88852b3121563dec96068bb59e32a2f4dd (patch)
treeb20f85ce76286f48dab9f2d35a748dcd13e33ef3 /modutils/modutils.c
parent1f0b95f1473bca7282fd8189f11b81af4e7f6b6a (diff)
downloadbusybox-w32-3b5c9b88852b3121563dec96068bb59e32a2f4dd.tar.gz
busybox-w32-3b5c9b88852b3121563dec96068bb59e32a2f4dd.tar.bz2
busybox-w32-3b5c9b88852b3121563dec96068bb59e32a2f4dd.zip
insmod/modprobe: do not pass NULL to kernel as module parameter
Diffstat (limited to 'modutils/modutils.c')
-rw-r--r--modutils/modutils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modutils/modutils.c b/modutils/modutils.c
index 5a4ba84e7..405785ff5 100644
--- a/modutils/modutils.c
+++ b/modutils/modutils.c
@@ -115,6 +115,9 @@ int FAST_FUNC bb_init_module(const char *filename, const char *options)
115 char *image; 115 char *image;
116 int rc = ENOENT; 116 int rc = ENOENT;
117 117
118 if (!options)
119 options = "";
120
118#if ENABLE_FEATURE_2_4_MODULES 121#if ENABLE_FEATURE_2_4_MODULES
119 if (get_linux_version_code() < KERNEL_VERSION(2,6,0)) 122 if (get_linux_version_code() < KERNEL_VERSION(2,6,0))
120 return bb_init_module_24(filename, options); 123 return bb_init_module_24(filename, options);
@@ -123,10 +126,9 @@ int FAST_FUNC bb_init_module(const char *filename, const char *options)
123 /* Use the 2.6 way */ 126 /* Use the 2.6 way */
124 image = xmalloc_open_zipped_read_close(filename, &len); 127 image = xmalloc_open_zipped_read_close(filename, &len);
125 if (image) { 128 if (image) {
129 rc = 0;
126 if (init_module(image, len, options) != 0) 130 if (init_module(image, len, options) != 0)
127 rc = errno; 131 rc = errno;
128 else
129 rc = 0;
130 free(image); 132 free(image);
131 } 133 }
132 134