← Commit list

1f5e25bf3

Rob Landley
Rob Landley
2006-03-06
SOURCE BUG Duration: 14s

Subject

Walt Wimer noticed that mknod couldn't handle major or minor > 255. Now our limit checking autodetects what the system supports (at compile time).

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 →

coreutils/mknod.c+4 -2
@@ -47,8 +47,10 @@ extern int mknod_main(int argc, char **argv)
dev = 0;
if ((*name != 'p') && ((argc -= 2) == 2)) {
- dev = (bb_xgetularg10_bnd(argv[2], 0, 255) << 8)
- + bb_xgetularg10_bnd(argv[3], 0, 255);
+ /* Autodetect what the system supports; thexe macros should
+ * optimize out to two constants. */
+ dev = makedev(bb_xgetularg10_bnd(argv[2], 0, major(UINT_MAX)),
+ bb_xgetularg10_bnd(argv[3], 0, minor(UINT_MAX)));
}
if (argc == 2) {