← Commit list

ae50c6d8e

Rob Landley
Rob Landley
2005-12-15
SOURCE BUG Duration: 8s

Subject

Better use of the ENABLE guards.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

modutils/modprobe.c+6 -7
@@ -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
}
}
}