aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-26 01:52:14 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-26 01:52:14 +0000
commit114ad9c753aeefac32a2d53b861790a4ecd5da30 (patch)
treef37031e8e09acfc1ea6e03eaea70692db1845221
parentdbb8f8d123b63a496df794ce60f638401d2e5a6a (diff)
downloadbusybox-w32-114ad9c753aeefac32a2d53b861790a4ecd5da30.tar.gz
busybox-w32-114ad9c753aeefac32a2d53b861790a4ecd5da30.tar.bz2
busybox-w32-114ad9c753aeefac32a2d53b861790a4ecd5da30.zip
Fix a stupid bug I introduced yesterday. Doh!
-Erik
-rw-r--r--insmod.c10
-rw-r--r--modutils/insmod.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/insmod.c b/insmod.c
index c51ee4f32..c0c7d3183 100644
--- a/insmod.c
+++ b/insmod.c
@@ -78,7 +78,7 @@
78#ifndef MODUTILS_MODULE_H 78#ifndef MODUTILS_MODULE_H
79static const int MODUTILS_MODULE_H = 1; 79static const int MODUTILS_MODULE_H = 1;
80 80
81#ident "$Id: insmod.c,v 1.40 2001/01/25 04:11:06 andersen Exp $" 81#ident "$Id: insmod.c,v 1.41 2001/01/26 01:52:14 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
285static const int MODUTILS_OBJ_H = 1; 285static const int MODUTILS_OBJ_H = 1;
286 286
287#ident "$Id: insmod.c,v 1.40 2001/01/25 04:11:06 andersen Exp $" 287#ident "$Id: insmod.c,v 1.41 2001/01/26 01:52:14 andersen Exp $"
288 288
289/* The relocatable object is manipulated using elfin types. */ 289/* The relocatable object is manipulated using elfin types. */
290 290
@@ -2932,10 +2932,10 @@ extern int insmod_main( int argc, char **argv)
2932 if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o') 2932 if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o')
2933 len -= 2; 2933 len -= 2;
2934 strncpy(m_fullName, tmp, len); 2934 strncpy(m_fullName, tmp, len);
2935 strcat(m_fullName, ".o"); 2935 if (*m_name == '\0') {
2936 if (m_name == NULL) { 2936 strcpy(m_name, m_fullName);
2937 memcpy(m_name, tmp, len);
2938 } 2937 }
2938 strcat(m_fullName, ".o");
2939 2939
2940 /* Get a filedesc for the module */ 2940 /* Get a filedesc for the module */
2941 if ((fp = fopen(argv[optind], "r")) == NULL) { 2941 if ((fp = fopen(argv[optind], "r")) == NULL) {
diff --git a/modutils/insmod.c b/modutils/insmod.c
index c51ee4f32..c0c7d3183 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -78,7 +78,7 @@
78#ifndef MODUTILS_MODULE_H 78#ifndef MODUTILS_MODULE_H
79static const int MODUTILS_MODULE_H = 1; 79static const int MODUTILS_MODULE_H = 1;
80 80
81#ident "$Id: insmod.c,v 1.40 2001/01/25 04:11:06 andersen Exp $" 81#ident "$Id: insmod.c,v 1.41 2001/01/26 01:52:14 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
285static const int MODUTILS_OBJ_H = 1; 285static const int MODUTILS_OBJ_H = 1;
286 286
287#ident "$Id: insmod.c,v 1.40 2001/01/25 04:11:06 andersen Exp $" 287#ident "$Id: insmod.c,v 1.41 2001/01/26 01:52:14 andersen Exp $"
288 288
289/* The relocatable object is manipulated using elfin types. */ 289/* The relocatable object is manipulated using elfin types. */
290 290
@@ -2932,10 +2932,10 @@ extern int insmod_main( int argc, char **argv)
2932 if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o') 2932 if (len > 2 && tmp[len - 2] == '.' && tmp[len - 1] == 'o')
2933 len -= 2; 2933 len -= 2;
2934 strncpy(m_fullName, tmp, len); 2934 strncpy(m_fullName, tmp, len);
2935 strcat(m_fullName, ".o"); 2935 if (*m_name == '\0') {
2936 if (m_name == NULL) { 2936 strcpy(m_name, m_fullName);
2937 memcpy(m_name, tmp, len);
2938 } 2937 }
2938 strcat(m_fullName, ".o");
2939 2939
2940 /* Get a filedesc for the module */ 2940 /* Get a filedesc for the module */
2941 if ((fp = fopen(argv[optind], "r")) == NULL) { 2941 if ((fp = fopen(argv[optind], "r")) == NULL) {