aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-16 10:22:34 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-16 10:22:34 +0000
commite3a792c80c9f9e12585dcf106fc336b75d782f41 (patch)
treed583a30a07554a188d1d8adc7b52b29fa13c9fe2
parent1f50e84283df7ac846f5abf8789fc253d60caf9c (diff)
downloadbusybox-w32-e3a792c80c9f9e12585dcf106fc336b75d782f41.tar.gz
busybox-w32-e3a792c80c9f9e12585dcf106fc336b75d782f41.tar.bz2
busybox-w32-e3a792c80c9f9e12585dcf106fc336b75d782f41.zip
Only pass modprobe module params with 2.6.x kernel support.
-Erik
-rw-r--r--modutils/modprobe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 0d9ea24d0..7d6115380 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -384,7 +384,7 @@ static int mod_strcmp ( const char *mod_path, const char *mod_name )
384static int already_loaded (const char *name) 384static int already_loaded (const char *name)
385{ 385{
386 int fd; 386 int fd;
387 char buffer[256]; 387 char buffer[4096];
388 388
389 fd = open ("/proc/modules", O_RDONLY); 389 fd = open ("/proc/modules", O_RDONLY);
390 if (fd < 0) 390 if (fd < 0)
@@ -409,7 +409,7 @@ static int already_loaded (const char *name)
409 409
410static int mod_process ( struct mod_list_t *list, int do_insert ) 410static int mod_process ( struct mod_list_t *list, int do_insert )
411{ 411{
412 char lcmd [256]; 412 char lcmd [4096];
413 int rc = 0; 413 int rc = 0;
414 414
415 while ( list ) { 415 while ( list ) {
@@ -550,6 +550,7 @@ static int mod_insert ( char *mod, int argc, char **argv )
550 check_dep ( mod, &head, &tail ); 550 check_dep ( mod, &head, &tail );
551 551
552 if ( head && tail ) { 552 if ( head && tail ) {
553#if defined(CONFIG_FEATURE_2_6_MODULES)
553 if ( argc ) { 554 if ( argc ) {
554 int i; 555 int i;
555 int l = 0; 556 int l = 0;
@@ -566,6 +567,7 @@ static int mod_insert ( char *mod, int argc, char **argv )
566 strcat ( head-> m_options, " " ); 567 strcat ( head-> m_options, " " );
567 } 568 }
568 } 569 }
570#endif
569 571
570 // process tail ---> head 572 // process tail ---> head
571 rc = mod_process ( tail, 1 ); 573 rc = mod_process ( tail, 1 );