diff options
| author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-08-16 10:22:34 +0000 |
|---|---|---|
| committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-08-16 10:22:34 +0000 |
| commit | db344c4ddbc4c07de15a45e4dfee47f513f34932 (patch) | |
| tree | d583a30a07554a188d1d8adc7b52b29fa13c9fe2 | |
| parent | 6e2538ea91d2173315c802d0a1ee6f1dbfba46c1 (diff) | |
| download | busybox-w32-db344c4ddbc4c07de15a45e4dfee47f513f34932.tar.gz busybox-w32-db344c4ddbc4c07de15a45e4dfee47f513f34932.tar.bz2 busybox-w32-db344c4ddbc4c07de15a45e4dfee47f513f34932.zip | |
Only pass modprobe module params with 2.6.x kernel support.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@9103 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | modutils/modprobe.c | 6 |
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 ) | |||
| 384 | static int already_loaded (const char *name) | 384 | static 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 | ||
| 410 | static int mod_process ( struct mod_list_t *list, int do_insert ) | 410 | static 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 ); |
