aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-15 07:42:13 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-12-15 07:42:13 +0000
commite94ac2cf8dba1319c9f4911bf42a6496a617c839 (patch)
tree112146a7efce2983b35f7e57927d4f96ec5caeb6
parent8af2a2ad88e7ceb7dc6a66f0a6861feea3c387cb (diff)
downloadbusybox-w32-e94ac2cf8dba1319c9f4911bf42a6496a617c839.tar.gz
busybox-w32-e94ac2cf8dba1319c9f4911bf42a6496a617c839.tar.bz2
busybox-w32-e94ac2cf8dba1319c9f4911bf42a6496a617c839.zip
Better use of the ENABLE guards.
git-svn-id: svn://busybox.net/trunk/busybox@12892 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--modutils/modprobe.c13
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 }