← Commit list

52219874f

Rob Landley
Rob Landley
2005-11-27
SOURCE BUG Duration: 7s

Subject

Patch from Cristian Ionescu-Idbohrn to deal with _ vs - better.

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/rmmod.c+11 -1
@@ -27,6 +27,7 @@
#include <getopt.h>
#include <fcntl.h>
#include <string.h>
+#include <sys/utsname.h>
#include <sys/syscall.h>
#include "busybox.h"
@@ -44,7 +45,16 @@ static inline void filename2modname(char *modname, const char *filename)
/* Convert to underscores, stop at first . */
for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {
- if (afterslash[i] == '-')
+ int kr_chk = 1;
+
+ if (ENABLE_FEATURE_2_4_MODULES) {
+ struct utsname uname_info;
+ if (uname(&uname_info) == -1)
+ bb_error_msg_and_die("cannot get uname data");
+ if (strcmp(uname_info.release, "2.6") < 0)
+ kr_chk = 0;
+ }
+ if (kr_chk && (afterslash[i] == '-'))
modname[i] = '_';
else
modname[i] = afterslash[i];