← Commit list

248d2220f

Mike Frysinger
Mike Frysinger
2006-02-03
SOURCE BUG Duration: 2s

Subject

shrink the code a bit

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 (Debian 14.2.0-19) 14.2.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mdev.c+5 -8
@@ -170,15 +170,13 @@ end:
static void find_dev(char *path)
{
DIR *dir;
- int len=strlen(path);
+ size_t len=strlen(path);
+ struct dirent *entry;
- if (!(dir = opendir(path)))
- bb_perror_msg_and_die("No %s",path);
+ if ((dir = opendir(path)) == NULL)
+ return;
- for (;;) {
- struct dirent *entry = readdir(dir);
-
- if (!entry) break;
+ while ((entry = readdir(dir)) != NULL) {
/* Skip "." and ".." (also skips hidden files, which is ok) */
@@ -187,7 +185,6 @@ static void find_dev(char *path)
if (entry->d_type == DT_DIR) {
snprintf(path+len, PATH_MAX-len, "/%s", entry->d_name);
find_dev(path);
- path[len] = 0;
}
/* If there's a dev entry, mknod it */