diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-01-24 23:59:50 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-01-24 23:59:50 +0000 |
| commit | 7a66879998d616454e5484c3fbb808d799b7bbdc (patch) | |
| tree | f05c1c845b6a27d93e10761684f182024c046848 /modutils | |
| parent | 789e66ce9fbf5803f522c51e98241f24c00f95c6 (diff) | |
| download | busybox-w32-7a66879998d616454e5484c3fbb808d799b7bbdc.tar.gz busybox-w32-7a66879998d616454e5484c3fbb808d799b7bbdc.tar.bz2 busybox-w32-7a66879998d616454e5484c3fbb808d799b7bbdc.zip | |
Bug fix and small create_module cleanup from Larry Doolittle to
fix insmod, since I broke var=value args when I getopt'ified it.
git-svn-id: svn://busybox.net/trunk/busybox@1659 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'modutils')
| -rw-r--r-- | modutils/insmod.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c index e52da91e4..fc49dcd34 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
| @@ -78,7 +78,7 @@ | |||
| 78 | #ifndef MODUTILS_MODULE_H | 78 | #ifndef MODUTILS_MODULE_H |
| 79 | static const int MODUTILS_MODULE_H = 1; | 79 | static const int MODUTILS_MODULE_H = 1; |
| 80 | 80 | ||
| 81 | #ident "$Id: insmod.c,v 1.38 2001/01/24 23:34:48 andersen Exp $" | 81 | #ident "$Id: insmod.c,v 1.39 2001/01/24 23:59:50 andersen Exp $" |
| 82 | 82 | ||
| 83 | /* This file contains the structures used by the 2.0 and 2.1 kernels. | 83 | /* This file contains the structures used by the 2.0 and 2.1 kernels. |
| 84 | We do not use the kernel headers directly because we do not wish | 84 | We do not use the kernel headers directly because we do not wish |
| @@ -284,7 +284,7 @@ int delete_module(const char *); | |||
| 284 | #ifndef MODUTILS_OBJ_H | 284 | #ifndef MODUTILS_OBJ_H |
| 285 | static const int MODUTILS_OBJ_H = 1; | 285 | static const int MODUTILS_OBJ_H = 1; |
| 286 | 286 | ||
| 287 | #ident "$Id: insmod.c,v 1.38 2001/01/24 23:34:48 andersen Exp $" | 287 | #ident "$Id: insmod.c,v 1.39 2001/01/24 23:59:50 andersen Exp $" |
| 288 | 288 | ||
| 289 | /* The relocatable object is manipulated using elfin types. */ | 289 | /* The relocatable object is manipulated using elfin types. */ |
| 290 | 290 | ||
| @@ -3039,6 +3039,9 @@ extern int insmod_main( int argc, char **argv) | |||
| 3039 | } | 3039 | } |
| 3040 | obj_allocate_commons(f); | 3040 | obj_allocate_commons(f); |
| 3041 | 3041 | ||
| 3042 | /* done with the module name, on to the optional var=value arguments */ | ||
| 3043 | ++optind; | ||
| 3044 | |||
| 3042 | if (optind < argc) { | 3045 | if (optind < argc) { |
| 3043 | if (m_has_modinfo | 3046 | if (m_has_modinfo |
| 3044 | ? !new_process_module_arguments(f, argc - optind, argv + optind) | 3047 | ? !new_process_module_arguments(f, argc - optind, argv + optind) |
| @@ -3058,11 +3061,8 @@ extern int insmod_main( int argc, char **argv) | |||
| 3058 | m_size = obj_load_size(f); | 3061 | m_size = obj_load_size(f); |
| 3059 | 3062 | ||
| 3060 | 3063 | ||
| 3061 | errno = 0; | ||
| 3062 | m_addr = create_module(m_name, m_size); | 3064 | m_addr = create_module(m_name, m_size); |
| 3063 | switch (errno) { | 3065 | if (m_addr==-1) switch (errno) { |
| 3064 | case 0: | ||
| 3065 | break; | ||
| 3066 | case EEXIST: | 3066 | case EEXIST: |
| 3067 | error_msg("A module named %s already exists\n", m_name); | 3067 | error_msg("A module named %s already exists\n", m_name); |
| 3068 | goto out; | 3068 | goto out; |
