aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-06-26 11:16:22 +0000
committerEric Andersen <andersen@codepoet.org>2000-06-26 11:16:22 +0000
commitef40aa81c5024bc305a4e95f6edb76bae258cc2b (patch)
tree8639d692540490e21de99f0be54b8b4d6d698456
parent3adffb7fc86ece4a9c8f550abf049a459f1ea1f6 (diff)
downloadbusybox-w32-ef40aa81c5024bc305a4e95f6edb76bae258cc2b.tar.gz
busybox-w32-ef40aa81c5024bc305a4e95f6edb76bae258cc2b.tar.bz2
busybox-w32-ef40aa81c5024bc305a4e95f6edb76bae258cc2b.zip
* Fixed insmod module option parsing for options lacking an '='.
Fix thanks to Marc Nijdam <marc_nijdam@hp.com> -Erik
-rw-r--r--Changelog2
-rw-r--r--insmod.c12
-rw-r--r--modutils/insmod.c12
3 files changed, 18 insertions, 8 deletions
diff --git a/Changelog b/Changelog
index aa8b15db7..889d17df3 100644
--- a/Changelog
+++ b/Changelog
@@ -4,6 +4,8 @@
4 "none" entries in /proc/mounts, added a hack to make sysinfo 4 "none" entries in /proc/mounts, added a hack to make sysinfo
5 work with both old and new kernels). 5 work with both old and new kernels).
6 * Fixed a nasty bug in tar when could mess up saved symlinks. 6 * Fixed a nasty bug in tar when could mess up saved symlinks.
7 * Fixed insmod module option parsing for options lacking an '='.
8 Fix thanks to Marc Nijdam <marc_nijdam@hp.com>
7 9
8 -Erik Andersen 10 -Erik Andersen
9 11
diff --git a/insmod.c b/insmod.c
index f6575c97f..006468877 100644
--- a/insmod.c
+++ b/insmod.c
@@ -71,7 +71,7 @@
71#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
72#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
73 73
74#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $" 74#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
75 75
76/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
77 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -277,7 +277,7 @@ int delete_module(const char *);
277#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
278#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
279 279
280#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $" 280#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
281 281
282/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
283 283
@@ -1189,8 +1189,10 @@ old_process_module_arguments(struct obj_file *f, int argc, char **argv)
1189 int *loc; 1189 int *loc;
1190 1190
1191 p = *argv; 1191 p = *argv;
1192 if ((q = strchr(p, '=')) == NULL) 1192 if ((q = strchr(p, '=')) == NULL) {
1193 argc--;
1193 continue; 1194 continue;
1195 }
1194 *q++ = '\0'; 1196 *q++ = '\0';
1195 1197
1196 sym = obj_find_symbol(f, p); 1198 sym = obj_find_symbol(f, p);
@@ -1550,8 +1552,10 @@ new_process_module_arguments(struct obj_file *f, int argc, char **argv)
1550 int min, max, n; 1552 int min, max, n;
1551 1553
1552 p = *argv; 1554 p = *argv;
1553 if ((q = strchr(p, '=')) == NULL) 1555 if ((q = strchr(p, '=')) == NULL) {
1556 argc--;
1554 continue; 1557 continue;
1558 }
1555 1559
1556 key = alloca(q - p + 6); 1560 key = alloca(q - p + 6);
1557 memcpy(key, "parm_", 5); 1561 memcpy(key, "parm_", 5);
diff --git a/modutils/insmod.c b/modutils/insmod.c
index f6575c97f..006468877 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -71,7 +71,7 @@
71#ifndef MODUTILS_MODULE_H 71#ifndef MODUTILS_MODULE_H
72#define MODUTILS_MODULE_H 1 72#define MODUTILS_MODULE_H 1
73 73
74#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $" 74#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
75 75
76/* This file contains the structures used by the 2.0 and 2.1 kernels. 76/* This file contains the structures used by the 2.0 and 2.1 kernels.
77 We do not use the kernel headers directly because we do not wish 77 We do not use the kernel headers directly because we do not wish
@@ -277,7 +277,7 @@ int delete_module(const char *);
277#ifndef MODUTILS_OBJ_H 277#ifndef MODUTILS_OBJ_H
278#define MODUTILS_OBJ_H 1 278#define MODUTILS_OBJ_H 1
279 279
280#ident "$Id: insmod.c,v 1.10 2000/06/22 18:19:31 andersen Exp $" 280#ident "$Id: insmod.c,v 1.11 2000/06/26 11:16:22 andersen Exp $"
281 281
282/* The relocatable object is manipulated using elfin types. */ 282/* The relocatable object is manipulated using elfin types. */
283 283
@@ -1189,8 +1189,10 @@ old_process_module_arguments(struct obj_file *f, int argc, char **argv)
1189 int *loc; 1189 int *loc;
1190 1190
1191 p = *argv; 1191 p = *argv;
1192 if ((q = strchr(p, '=')) == NULL) 1192 if ((q = strchr(p, '=')) == NULL) {
1193 argc--;
1193 continue; 1194 continue;
1195 }
1194 *q++ = '\0'; 1196 *q++ = '\0';
1195 1197
1196 sym = obj_find_symbol(f, p); 1198 sym = obj_find_symbol(f, p);
@@ -1550,8 +1552,10 @@ new_process_module_arguments(struct obj_file *f, int argc, char **argv)
1550 int min, max, n; 1552 int min, max, n;
1551 1553
1552 p = *argv; 1554 p = *argv;
1553 if ((q = strchr(p, '=')) == NULL) 1555 if ((q = strchr(p, '=')) == NULL) {
1556 argc--;
1554 continue; 1557 continue;
1558 }
1555 1559
1556 key = alloca(q - p + 6); 1560 key = alloca(q - p + 6);
1557 memcpy(key, "parm_", 5); 1561 memcpy(key, "parm_", 5);