aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-12-14 08:32:44 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-12-14 08:32:44 +0000
commit17d355cb3c97d50b9ffe39442bd2896abddd92f0 (patch)
tree8d96b72855f556e0d8d923de16a566a9b8787c9f
parente6d88ea2a1acf57e3dae35aa19eeb17f4be5ed8b (diff)
downloadbusybox-w32-17d355cb3c97d50b9ffe39442bd2896abddd92f0.tar.gz
busybox-w32-17d355cb3c97d50b9ffe39442bd2896abddd92f0.tar.bz2
busybox-w32-17d355cb3c97d50b9ffe39442bd2896abddd92f0.zip
- remove warning (thanks Yann E. MORIN) and switch to ENABLE_
- typo: s/begining/beginning/g
-rw-r--r--modutils/modprobe.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 31fc9baf2..accace176 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -5,7 +5,7 @@
5 * Copyright (c) 2002 by Robert Griebl, griebl@gmx.de 5 * Copyright (c) 2002 by Robert Griebl, griebl@gmx.de
6 * Copyright (c) 2003 by Andrew Dennison, andrew.dennison@motec.com.au 6 * Copyright (c) 2003 by Andrew Dennison, andrew.dennison@motec.com.au
7 * Copyright (c) 2005 by Jim Bauer, jfbauer@nfr.com 7 * Copyright (c) 2005 by Jim Bauer, jfbauer@nfr.com
8 * 8 *
9 * Portions Copyright (c) 2005 by Yann E. MORIN, yann.morin.1998@anciens.enib.fr 9 * Portions Copyright (c) 2005 by Yann E. MORIN, yann.morin.1998@anciens.enib.fr
10 * 10 *
11 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 11 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
@@ -33,7 +33,7 @@ struct dep_t { /* one-way list of dependency rules */
33 char * m_name; /* the module name*/ 33 char * m_name; /* the module name*/
34 char * m_path; /* the module file path */ 34 char * m_path; /* the module file path */
35 struct mod_opt_t * m_options; /* the module options */ 35 struct mod_opt_t * m_options; /* the module options */
36 36
37 int m_isalias : 1; /* the module is an alias */ 37 int m_isalias : 1; /* the module is an alias */
38 int m_reserved : 15; /* stuffin' */ 38 int m_reserved : 15; /* stuffin' */
39 39
@@ -130,7 +130,7 @@ struct mod_opt_t *append_option( struct mod_opt_t *opt_list, char *opt )
130 return opt_list; 130 return opt_list;
131} 131}
132 132
133#if (defined CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS) 133#if ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS
134/* static char* parse_command_string( char* src, char **dst ); 134/* static char* parse_command_string( char* src, char **dst );
135 * src: pointer to string containing argument 135 * src: pointer to string containing argument
136 * dst: pointer to where to store the parsed argument 136 * dst: pointer to where to store the parsed argument
@@ -238,7 +238,7 @@ static char *parse_command_string( char *src, char **dst )
238 *dst = xrealloc( *dst, strlen( *dst ) ); 238 *dst = xrealloc( *dst, strlen( *dst ) );
239 return src; 239 return src;
240} 240}
241#endif /* CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS */ 241#endif /* ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
242 242
243/* 243/*
244 * This function builds a list of dependency rules from /lib/modules/`uname -r\modules.dep. 244 * This function builds a list of dependency rules from /lib/modules/`uname -r\modules.dep.
@@ -296,7 +296,7 @@ static struct dep_t *build_dep ( void )
296 296
297 /* Is this a new module dep description? */ 297 /* Is this a new module dep description? */
298 if ( !continuation_line ) { 298 if ( !continuation_line ) {
299 /* find the dep begining */ 299 /* find the dep beginning */
300 char *col = strchr ( buffer, ':' ); 300 char *col = strchr ( buffer, ':' );
301 char *dot = col; 301 char *dot = col;
302 302
@@ -382,7 +382,7 @@ static struct dep_t *build_dep ( void )
382 else 382 else
383 next = end; 383 next = end;
384 384
385 /* find the begining of the module file name */ 385 /* find the beginning of the module file name */
386 deps = strrchr ( p, '/' ); 386 deps = strrchr ( p, '/' );
387 387
388 if ( !deps || ( deps < p )) { 388 if ( !deps || ( deps < p )) {
@@ -428,7 +428,7 @@ static struct dep_t *build_dep ( void )
428 428
429 // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) ! 429 // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) !
430 430
431#if defined(CONFIG_FEATURE_2_6_MODULES) 431#if ENABLE_FEATURE_2_6_MODULES
432 if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 ) 432 if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 )
433#endif 433#endif
434 if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 ) 434 if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 )
@@ -497,14 +497,14 @@ static struct dep_t *build_dep ( void )
497 break; 497 break;
498 } 498 }
499 if ( dt ) { 499 if ( dt ) {
500 if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS ) { 500#if ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS
501 char* new_opt = NULL; 501 char* new_opt = NULL;
502 while( ( opt = parse_command_string( opt, &new_opt ) ) ) { 502 while( ( opt = parse_command_string( opt, &new_opt ) ) ) {
503 dt-> m_options = append_option( dt-> m_options, new_opt ); 503 dt-> m_options = append_option( dt-> m_options, new_opt );
504 }
505 } else {
506 dt-> m_options = append_option( dt-> m_options, opt );
507 } 504 }
505#else
506 dt-> m_options = append_option( dt-> m_options, opt );
507#endif
508 } 508 }
509 } 509 }
510 } 510 }
@@ -711,7 +711,7 @@ static void check_dep ( char *mod, struct mod_list_t **head, struct mod_list_t *
711 mod = dt-> m_name; 711 mod = dt-> m_name;
712 path = dt-> m_path; 712 path = dt-> m_path;
713 opt = dt-> m_options; 713 opt = dt-> m_options;
714 714
715 // search for duplicates 715 // search for duplicates
716 for ( find = *head; find; find = find-> m_next ) { 716 for ( find = *head; find; find = find-> m_next ) {
717 if ( !strcmp ( mod, find-> m_name )) { 717 if ( !strcmp ( mod, find-> m_name )) {