aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 }