summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2005-12-15 07:42:13 +0000
committerRob Landley2005-12-15 07:42:13 +0000
commitae50c6d8ee755ae2171d0d2514c045a2e8cb3134 (patch)
tree112146a7efce2983b35f7e57927d4f96ec5caeb6
parente0c418e13b005908da492ae2151096e8f2246287 (diff)
downloadbusybox-ae50c6d8ee755ae2171d0d2514c045a2e8cb3134.zip
busybox-ae50c6d8ee755ae2171d0d2514c045a2e8cb3134.tar.gz
Better use of the ENABLE guards.
-rw-r--r--modutils/modprobe.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index accace1..c9e6701 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -238,6 +238,8 @@ static char *parse_command_string( char *src, char **dst )
*dst = xrealloc( *dst, strlen( *dst ) );
return src;
}
+#else
+#define parse_command_string(src, dst) (0)
#endif /* ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS */
/*
@@ -428,9 +430,8 @@ static struct dep_t *build_dep ( void )
// alias parsing is not 100% correct (no correct handling of continuation lines within an alias) !
-#if ENABLE_FEATURE_2_6_MODULES
- if (( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 )
-#endif
+ if (!ENABLE_FEATURE_2_6_MODULES
+ || ( fd = open ( "/etc/modprobe.conf", O_RDONLY )) < 0 )
if (( fd = open ( "/etc/modules.conf", O_RDONLY )) < 0 )
if (( fd = open ( "/etc/conf.modules", O_RDONLY )) < 0 )
return first;
@@ -496,15 +497,13 @@ static struct dep_t *build_dep ( void )
if ( strcmp ( dt-> m_name, mod ) == 0 )
break;
}
- if ( dt ) {
-#if ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS
+ if ( ENABLE_FEATURE_MODPROBE_MULTIPLE_OPTIONS && dt ) {
char* new_opt = NULL;
while( ( opt = parse_command_string( opt, &new_opt ) ) ) {
dt-> m_options = append_option( dt-> m_options, new_opt );
}
-#else
+ } else {
dt-> m_options = append_option( dt-> m_options, opt );
-#endif
}
}
}