← Commit list

ff567f794

Rob Landley
Rob Landley
2005-10-11
SOURCE BUG Duration: 6s

Subject

The check for EROFS was wrong. For example, if you try to mount a filesystem appended to an executable that's being run (yes, I'm doing this) you get EPERM, but mounting readonly fixes it. Doing the fallback all the time shouldn't hurt, and is one less test.

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 →

libbb/loop.c+3 -4
@@ -88,10 +88,9 @@ extern int set_loop(char **device, const char *file, int offset)
int i, dfd, ffd, mode, rc=1;
// Open the file. Barf if this doesn't work.
- if((ffd = open(file, mode=O_RDWR))<0)
- if(errno!=EROFS || (ffd=open(file,mode=O_RDONLY))<0)
- return errno;
-
+ if((ffd = open(file, mode=O_RDWR))<0 && (ffd = open(file,mode=O_RDONLY))<0)
+ return errno;
+
// Find a loop device
for(i=0;rc;i++) {
sprintf(dev, LOOP_FORMAT, i++);