diff options
author | Rob Landley <rob@landley.net> | 2005-12-15 07:42:13 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-12-15 07:42:13 +0000 |
commit | ae50c6d8ee755ae2171d0d2514c045a2e8cb3134 (patch) | |
tree | 112146a7efce2983b35f7e57927d4f96ec5caeb6 /modutils/modprobe.c | |
parent | e0c418e13b005908da492ae2151096e8f2246287 (diff) | |
download | busybox-w32-ae50c6d8ee755ae2171d0d2514c045a2e8cb3134.tar.gz busybox-w32-ae50c6d8ee755ae2171d0d2514c045a2e8cb3134.tar.bz2 busybox-w32-ae50c6d8ee755ae2171d0d2514c045a2e8cb3134.zip |
Better use of the ENABLE guards.
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index accace176..c9e6701ef 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -238,6 +238,8 @@ 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 | #else | ||
242 | #define parse_command_string(src, dst) (0) | ||
241 | #endif /* ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS */ | 243 | #endif /* ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS */ |
242 | 244 | ||
243 | /* | 245 | /* |
@@ -428,9 +430,8 @@ static struct dep_t *build_dep ( void ) | |||
428 | 430 | ||
429 | // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) ! | 431 | // alias parsing is not 100% correct (no correct handling of continuation lines within an alias) ! |
430 | 432 | ||
431 | #if ENABLE_FEATURE_2_6_MODULES | 433 | if (!ENABLE_FEATURE_2_6_MODULES |
432 | if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 ) | 434 | || ( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 ) |
433 | #endif | ||
434 | if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 ) | 435 | if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 ) |
435 | if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 ) | 436 | if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 ) |
436 | return first; | 437 | return first; |
@@ -496,15 +497,13 @@ static struct dep_t *build_dep ( void ) | |||
496 | if ( strcmp ( dt-> m_name, mod ) == 0 ) | 497 | if ( strcmp ( dt-> m_name, mod ) == 0 ) |
497 | break; | 498 | break; |
498 | } | 499 | } |
499 | if ( dt ) { | 500 | if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS && dt ) { |
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 | } | 504 | } |
505 | #else | 505 | } else { |
506 | dt-> m_options = append_option( dt-> m_options, opt ); | 506 | dt-> m_options = append_option( dt-> m_options, opt ); |
507 | #endif | ||
508 | } | 507 | } |
509 | } | 508 | } |
510 | } | 509 | } |