From bugzilla at busybox.net Tue Nov 1 02:07:53 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Tue, 01 Nov 2022 02:07:53 +0000 Subject: [Bug 15086] New: Busybox bc Calculator bc_vec_npush Function Uaf Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15086 Bug ID: 15086 Summary: Busybox bc Calculator bc_vec_npush Function Uaf Product: Busybox Version: 1.33.x Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Standard Compliance Assignee: unassigned at busybox.net Reporter: sohu0106 at 126.com CC: busybox-cvs at busybox.net Target Milestone: --- Created attachment 9391 --> https://bugs.busybox.net/attachment.cgi?id=9391&action=edit poc 1. Busybox bc Calculator bc_vec_npush Function Uaf Vulnerability busybox-master\busybox\miscutils\bc.c In line 1105?UAF Caused by the Memory Referenced by v 1102 1103 static size_t bc_vec_npush(BcVec *v, size_t n, const void *da ta) 1104 { 1105 size_t len = v->len; 1106 if (len + n > v->cap) bc_vec_grow(v, n); 1107 memmove(v->v + (v->size * len), data, v->size * n); 1108 v->len = len + n; 1109 return len; 1110 } 1111 2 Affected versions Busybox 1.33 to Busybox 1.35 The latest version is affected. 3 asan report busybox_unstripped bc id:000083,sig:06,src:001758+001745,time:662304425,execs:76703360,op:splice,rep:2 bc 1.36.0.git Adapted from https://github.com/gavinhoward/bc Original code (c) 2018 Gavin D. Howard and contributors 1 4 49 4 4 ================================================================= ==1231022==ERROR: AddressSanitizer: heap-use-after-free on address 0x623000000108 at pc 0x55b9a94ac5f9 bp 0x7ffc33fe5990 sp 0x7ffc33fe5980 READ of size 8 at 0x623000000108 thread T0 #0 0x55b9a94ac5f8 in bc_vec_npush miscutils/bc.c:1148 0x623000000108 is located 8 bytes inside of 6912-byte region [0x623000000100,0x623000001c00) freed by thread T0 here: #0 0x7f78a30a7ffe in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe) #1 0x55b9a9488f7e in xrealloc libbb/xfuncs_printf.c:61 #2 0x55b9a9ab5d3f (busybox-master/busybox_unstripped+0xed0d3f) previously allocated by thread T0 here: #0 0x7f78a30a7bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8) #1 0x55b9a9488f30 in xmalloc libbb/xfuncs_printf.c:50 SUMMARY: AddressSanitizer: heap-use-after-free miscutils/bc.c:1148 in bc_vec_npush Shadow bytes around the buggy address: 0x0c467fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c467fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c467fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c467fff8000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c467fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x0c467fff8020: fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c467fff8030: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c467fff8040: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c467fff8050: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c467fff8060: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c467fff8070: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==1231022==ABORTING -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Tue Nov 1 02:11:01 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Tue, 01 Nov 2022 02:11:01 +0000 Subject: [Bug 15091] New: Busybox bc Calculator zxc_lex_next Function Stack Overflow Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15091 Bug ID: 15091 Summary: Busybox bc Calculator zxc_lex_next Function Stack Overflow Product: Busybox Version: 1.33.x Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Standard Compliance Assignee: unassigned at busybox.net Reporter: sohu0106 at 126.com CC: busybox-cvs at busybox.net Target Milestone: --- Created attachment 9396 --> https://bugs.busybox.net/attachment.cgi?id=9396&action=edit poc 1. Busybox bc Calculator zxc_lex_next Function Stack Overflow busybox-master\busybox-1.33.1\miscutils\bc.c In line 2971?stack overflow by &G.prs 2966 #define zbc_lex_token(...) (zbc_lex_token(__VA_ARGS__) COMMA_SUCCES S) 2967 #define zdc_lex_token(...) (zdc_lex_token(__VA_ARGS__) COMMA_SUCCES S) 2968 2969 static BC_STATUS zxc_lex_next(void) 2970 { 2971 BcParse *p = &G.prs; 2972 BcStatus s; 2973 2974 G.err_line = p->lex_line; 2975 p->lex_last = p->lex; 2976 //why? 2977 // if (p->lex_last == XC_LEX_EOF) 2978 // RETURN_STATUS(bc_error("end of file")); 2979 2 Affected versions Busybox 1.33 3 asan report busybox-1.33.1/busybox_unstripped bc id:000070,sig:11,src:000521,time:393476879,execs:45282546,op:havoc,rep:16 bc 1.33.1 Adapted from https://github.com/gavinhoward/bc Original code (c) 2018 Gavin D. Howard and contributors AddressSanitizer:DEADLYSIGNAL ================================================================= ==1384283==ERROR: AddressSanitizer: stack-overflow on address 0x7ffeffc14fb8 (pc 0x55fdbe760cd8 bp 0x619000000580 sp 0x7ffeffc14fb8 T0) #0 0x55fdbe760cd7 in zxc_lex_next miscutils/bc.c:2971 SUMMARY: AddressSanitizer: stack-overflow miscutils/bc.c:2971 in zxc_lex_next ==1384283==ABORTING -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Tue Nov 1 02:15:06 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Tue, 01 Nov 2022 02:15:06 +0000 Subject: [Bug 15096] New: Busybox bc Calculator zbc_parse_stmt_possibly_auto Function Stack Overflow Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15096 Bug ID: 15096 Summary: Busybox bc Calculator zbc_parse_stmt_possibly_auto Function Stack Overflow Product: Busybox Version: 1.33.x Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Standard Compliance Assignee: unassigned at busybox.net Reporter: sohu0106 at 126.com CC: busybox-cvs at busybox.net Target Milestone: --- Created attachment 9401 --> https://bugs.busybox.net/attachment.cgi?id=9401&action=edit poc 1. Busybox bc Calculator zbc_parse_stmt_possibly_auto Function Stack Overflow busybox-master\busybox-1.33.1\miscutils\bc.c In line 4584?stack overflow by &G.prs 4579 #define zbc_parse_auto(...) (zbc_parse_auto(__VA_ARGS__) COMMA_SUCCE SS) 4580 4581 #undef zbc_parse_stmt_possibly_auto 4582 static BC_STATUS zbc_parse_stmt_possibly_auto(bool auto_allowed) 4583 { 4584 BcParse *p = &G.prs; 4585 BcStatus s = BC_STATUS_SUCCESS; 4586 4587 dbg_lex_enter("%s:%d entered, p->lex:%d", __func__, __LINE__ , p->lex); 4588 4589 if (p->lex == XC_LEX_NLINE) { 4590 dbg_lex_done("%s:%d done (seen XC_LEX_NLINE)", __fun c__, __LINE__); 4591 RETURN_STATUS(s); 4592 } 2 Affected versions Busybox 1.33 3 asan report busybox-1.33.1/busybox_unstripped bc id\:000032\,sig\:11\,src\:000737\,time\:90108123\,execs\:9999153\,op\:havoc\,rep\:16 bc 1.33.1 Adapted from https://github.com/gavinhoward/bc Original code (c) 2018 Gavin D. Howard and contributors AddressSanitizer:DEADLYSIGNAL ================================================================= ==1564774==ERROR: AddressSanitizer: stack-overflow on address 0x7ffe0c9dffe8 (pc 0x55615737f984 bp 0x619000000580 sp 0x7ffe0c9dffe8 T0) #0 0x55615737f983 in zbc_parse_stmt_possibly_auto miscutils/bc.c:4584 SUMMARY: AddressSanitizer: stack-overflow miscutils/bc.c:4584 in zbc_parse_stmt_possibly_auto ==1564774==ABORTING -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Sat Nov 5 03:22:53 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Sat, 05 Nov 2022 03:22:53 +0000 Subject: [Bug 15101] New: id prints incorrect euid if it differs from ruid Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15101 Bug ID: 15101 Summary: id prints incorrect euid if it differs from ruid Product: Busybox Version: 1.35.x Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Other Assignee: unassigned at busybox.net Reporter: robryk at gmail.com CC: busybox-cvs at busybox.net Target Milestone: --- Observations: When I call `busybox id` with EUID=0 and RUID!=0 it behaves as if EUID=RUID!=0. It prints: uid=1000(regular) gid=100(users) groups=100(users) When I expect (and coreutils id prints): uid=1000(regular) gid=100(users) euid=0(root) groups=100(users) I use NixOS, which makes .config slightly tiresome to extract. You can find the templates bash script used to generate it at https://github.com/NixOS/nixpkgs/blob/8982f61dd3b58d5520705082069828d87e9fcefc/pkgs/os-specific/linux/busybox/default.nix#L97. Please let me know if you want the exact .config that was used to build my busybox and I will do the slightly tiresome thing. How to reproduce: The easiest way to call something in this fashion is to write a trivial wrapper in C (that just calls execve with appropriate arguments), make it SUID and owned by root, and run it. What I think is happening: Busybox applets declare "bb_suid_t" in their declarations, so that they can define their expectations around EUID to handle cases when busybox binary is SUID. There are three available values: - BB_SUID_DROP -- always set EUID to RUID before starting the applet, - BB_SUID_MAYBE -- do nothing, - BB_SUID_REQUIRE -- fail unless EUID==0. The id applet declares itself to be of BB_SUID_DROP type. This means that _even if busybox is not SUID_, we will set EUID to RUID before running the applet. Suggestions: If the busybox binary _is_ SUID, we are unable to do anything useful here, because the EUID of the caller is destroyed when busybox is execed. If the busybox binary is not SUID, we are making an unforced mistake here: we are destroying the EUID information, which is correct. I would suggest that in handling of BB_SUID_DROP, we detect whether /proc/self/exe is SUID and do not do anything if it isn't. I don't know what I'd expect to happen for busybox binaries that _are_ SUID, given that it's impossible to implement the correct behaviour. -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Sat Nov 5 03:54:32 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Sat, 05 Nov 2022 03:54:32 +0000 Subject: [Bug 15101] id prints incorrect euid if it differs from ruid In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15101 --- Comment #1 from robryk at gmail.com --- I've realized that CONFIG_FEATURE_SUID exists, that unsetting it makes the issue go away, and that it's set by default (and not unset by my configuration). Likely it makes sense to disable it in NixOS. However, we could still improve the (common?) case of busybox not being SUID but compiled with the default value of that option. -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Tue Nov 8 08:01:37 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Tue, 08 Nov 2022 08:01:37 +0000 Subject: [Bug 15106] New: thre is a directory traversal vulnerability of "tar" appet Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15106 Bug ID: 15106 Summary: thre is a directory traversal vulnerability of "tar" appet Product: Busybox Version: unspecified Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Other Assignee: unassigned at busybox.net Reporter: alligatorking at 126.com CC: busybox-cvs at busybox.net Target Milestone: --- In general case, it is not allowed to create files or soft links outside the decompression directory. However, by constructing multiple soft links with the same name to exploit two cycles of extracting, creating any soft link at any location pointing to any target file is possible. An poc is given , which shows that after executing tar to process the special file, the ?rm?is hijacked. -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Tue Nov 8 08:28:29 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Tue, 08 Nov 2022 08:28:29 +0000 Subject: [Bug 15106] thre is a directory traversal vulnerability of "tar" appet In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15106 --- Comment #1 from xiedongmo --- Created attachment 9406 --> https://bugs.busybox.net/attachment.cgi?id=9406&action=edit the poc detail the poc detail. hack5.tar shows how to construct an tar to attack. runpoc.png shows the result after attacking -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Wed Nov 9 08:21:44 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Wed, 09 Nov 2022 08:21:44 +0000 Subject: [Bug 15106] thre is a directory traversal vulnerability of "tar" appet In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15106 xiedongmo changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Wed Nov 9 10:37:25 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Wed, 09 Nov 2022 10:37:25 +0000 Subject: [Bug 15111] New: crond appears not to correctly parse step and list entries Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15111 Bug ID: 15111 Summary: crond appears not to correctly parse step and list entries Product: Busybox Version: 1.35.x Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: Standard Compliance Assignee: unassigned at busybox.net Reporter: robert at mcqueen.me.uk CC: busybox-cvs at busybox.net Target Milestone: --- It appears from inspecting the code that busybox crond intends to find and use step (ie n/m per https://git.busybox.net/busybox/tree/miscutils/crond.c#n286) and list (ie x,y,z per https://git.busybox.net/busybox/tree/miscutils/crond.c#n313) values from crontab entries, allowing a job to be scheduled at eg several nonconsecutive hours during the same day. Running crond with -d 5 to expect the filled arrays, this code appears not to be working correctly. Crontab entry: 14 2/6 * * * Debug output: 000000000000001000000000000000000000000000000000000000000000 001000000000000000000000 11111111111111111111111111111111 111111111111 1111111 Expected output: 000000000000001000000000000000000000000000000000000000000000 001000001000001000001000 11111111111111111111111111111111 111111111111 1111111 Crontab entry: 14 2,10,18 * * * Debug output: 000000000000001000000000000000000000000000000000000000000000 001000000000000000000000 11111111111111111111111111111111 111111111111 1111111 Expected output: 000000000000001000000000000000000000000000000000000000000000 001000000010000000100000 11111111111111111111111111111111 111111111111 1111111 -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Wed Nov 9 10:48:21 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Wed, 09 Nov 2022 10:48:21 +0000 Subject: [Bug 15111] crond appears not to correctly parse step and list entries In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15111 Robert McQueen changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Robert McQueen --- Resolving as invalid; sorry for time-wasting! The first syntax should be 2-23/6, which works, and in the second case I swapped around my debug logs and it does in fact work as intended. -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Wed Nov 9 14:47:21 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Wed, 09 Nov 2022 14:47:21 +0000 Subject: [Bug 15106] there is a directory traversal vulnerability of "tar" applet In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15106 xiedongmo changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|thre is a directory |there is a directory |traversal vulnerability of |traversal vulnerability of |"tar" appet |"tar" applet -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Fri Nov 11 09:58:50 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Fri, 11 Nov 2022 09:58:50 +0000 Subject: [Bug 15116] New: applet blkid stops working on linux kernel 6.0.7 and 6.0.8 Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15116 Bug ID: 15116 Summary: applet blkid stops working on linux kernel 6.0.7 and 6.0.8 Product: Busybox Version: 1.35.x Hardware: PC OS: Linux Status: NEW Severity: critical Priority: P5 Component: Other Assignee: unassigned at busybox.net Reporter: jordipujolp at gmail.com CC: busybox-cvs at busybox.net Target Milestone: --- Hello, Working in linux kernel version 6.0.8 I am testing two blkid flavours, one from util-linux: Installed: 2.38.1-1.1+b1 and the applet of busybox: Installed: 1:1.35.0-4 The busybox applet can't relate any properties to their devices. # blkid /dev/sda4: LABEL="data" UUID="81a3d487-d18f-4ab4-8f2b-ae5f2d722c95" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="192d6b1e-04" /dev/sda2: LABEL="boot" UUID="cd47a624-a8b0-4a09-bbd2-2b7d46d2ff38" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="192d6b1e-02" /dev/sda3: LABEL="cow" UUID="67a2b94f-8bf9-4907-915e-859d83acfe65" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="192d6b1e-03" # busybox blkid /dev/sda4: LABEL="data" UUID="81a3d487-d18f-4ab4-8f2b-ae5f2d722c95" TYPE="ext4" /dev/sda3: LABEL="cow" UUID="67a2b94f-8bf9-4907-915e-859d83acfe65" TYPE="ext4" /dev/sda2: LABEL="boot" UUID="cd47a624-a8b0-4a09-bbd2-2b7d46d2ff38" TYPE="ext4" # blkid -l -t 'PARTUUID="192d6b1e-02"' -o device /dev/sda2 # busybox blkid -l -t 'PARTUUID=192d6b1e-02' -o device; echo $? 0 # blkid -l -t 'LABEL=cow' -o device /dev/sda3 # busybox blkid -l -t 'LABEL=cow' -o device; echo $? 0 Regards, Jordi Pujol -- You are receiving this mail because: You are on the CC list for the bug. From bugzilla at busybox.net Mon Nov 14 07:43:46 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Mon, 14 Nov 2022 07:43:46 +0000 Subject: [Bug 15116] applet blkid stops working on linux kernel 6.0.7 and 6.0.8 In-Reply-To: References: Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15116 Jordi Pujol changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #1 from Jordi Pujol --- busybox (1:1.35.0-4) unstable; urgency=medium * static build: disable blkid applet (CONFIG_BLKID, #1023501) Since static build has CONFIG_FEATURE_PREFER_APPLETS=y, enabling any utility which is also provided by the system in other ways can be risky, since busybox shell will choose its applet version instead of running the actual utility, even if that utility file exists in $PATH. After enabling blkid, we effectively overwrote blkid from libblkid as used in initramfs. The result was non- working udev rules for block devices (not creating /dev/disk/by-*/), and the system's unbootable. Disable it for now at least on static build. Closes: 1023501 * d/rules: recognize "terse" in $DEB_BUILD_OPTIONS to disable verbose build -- Michael Tokarev Sun, 06 Nov 2022 11:27:04 +0300 -- You are receiving this mail because: You are on the CC list for the bug. From vda.linux at googlemail.com Tue Nov 15 13:54:05 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Tue, 15 Nov 2022 14:54:05 +0100 Subject: [git commit] loop: fix a race when a free loop device is snatched Message-ID: <20221116122222.7B56F83CC8@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=cb8d2ea8c91b5671b05e06ab2282496104453378 branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master When /dev/loop-control exists and *device is empty, the mount may fail if a concurrent mount is running. function old new delta set_loop 809 807 -2 Signed-off-by: Xiaoming Ni Signed-off-by: Denys Vlasenko --- libbb/loop.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libbb/loop.c b/libbb/loop.c index cb8fa2442..750642ade 100644 --- a/libbb/loop.c +++ b/libbb/loop.c @@ -218,8 +218,17 @@ int FAST_FUNC set_loop(char **device, const char *file, unsigned long long offse } /* failure, undo LOOP_SET_FD */ ioctl(lfd, LOOP_CLR_FD, 0); // actually, 0 param is unnecessary + } else { + /* device is not free (rc == 0), or error other than ENXIO */ + if (rc == 0 /* device is not free? */ + && !*device /* racing with other mount? */ + && try != dev /* tried a _kernel-offered_ loopN? */ + ) { + free(try); + close(lfd); + goto get_free_loopN; + } } - /* else: device is not free (rc == 0) or error other than ENXIO */ close_and_try_next_loopN: close(lfd); try_next_loopN: From vda.linux at googlemail.com Wed Nov 16 12:39:35 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Wed, 16 Nov 2022 13:39:35 +0100 Subject: [git commit] fbset: abort on not handled options Message-ID: <20221116123947.19EED83CF2@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=e8dfa0c1bedf69783e54b5a7798fb14dcaeb0434 branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master Not all options are actually implemented. In this case, return a message and an error code to make it clear that the requested command has not been executed. function old new delta .rodata 105200 105224 +24 fbset_main 747 733 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 24/-14) Total: 10 bytes Signed-off-by: Dario Binacchi Signed-off-by: Denys Vlasenko --- util-linux/fbset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 41cc29f37..0eaa7c0a6 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c @@ -519,6 +519,9 @@ int fbset_main(int argc, char **argv) var_set.bits_per_pixel = xatou32(argv[1]); break; #endif + default: + bb_perror_msg_and_die("option '%s' not handled", + g_cmdoptions[i].name); } switch (g_cmdoptions[i].code) { case CMD_FB: From vda.linux at googlemail.com Wed Nov 16 12:40:34 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Wed, 16 Nov 2022 13:40:34 +0100 Subject: [git commit] fbset: support setting pixel clock rate Message-ID: <20221116124044.686EE83CF7@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=75fbff1326674b768cee66f32e3799d5bff5e194 branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master Only in case the FEATURE_FBSET_FANCY configuration is enabled. function old new delta fbset_main 733 766 +33 Signed-off-by: Dario Binacchi Signed-off-by: Denys Vlasenko --- util-linux/fbset.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 0eaa7c0a6..768ab80eb 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c @@ -518,6 +518,9 @@ int fbset_main(int argc, char **argv) case CMD_DEPTH: var_set.bits_per_pixel = xatou32(argv[1]); break; + case CMD_PIXCLOCK: + var_set.pixclock = xatou32(argv[1]); + break; #endif default: bb_perror_msg_and_die("option '%s' not handled", From bugzilla at busybox.net Sat Nov 26 17:59:57 2022 From: bugzilla at busybox.net (bugzilla at busybox.net) Date: Sat, 26 Nov 2022 17:59:57 +0000 Subject: [Bug 15146] New: xargs: Allow running interactive commands with -o [PATCH] Message-ID: https://bugs.busybox.net/show_bug.cgi?id=15146 Bug ID: 15146 Summary: xargs: Allow running interactive commands with -o [PATCH] Product: Busybox Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 Component: Other Assignee: unassigned at busybox.net Reporter: malloryadams at fastmail.com CC: busybox-cvs at busybox.net Target Milestone: --- Created attachment 9416 --> https://bugs.busybox.net/attachment.cgi?id=9416&action=edit Patch to add -o support https://github.com/MalloryA/busybox/commit/2b66ae249d87c3b1c427cc87862ad6612b27c271 -o opens /dev/tty and connects it to the stdin of the commands that get executed. Example: say we want to delete some files interactively. We cannot do that with xargs without the -o option because the `rm -i` command does not receive an interactive stdin. But if we add `-o`, then xargs will ensure that /dev/tty is connected as stdin and `rm -i` will show us a prompt and wait: ``` % touch a b c % echo a b c | xargs -o rm -i ``` The -o option is available in GNU and FreeBSD versions of xargs as non-POSIX extensions. Attached is a patch generated by `git format-patch`. I put the same patch on GitHub too: https://github.com/MalloryA/busybox/commit/2b66ae249d87c3b1c427cc87862ad6612b27c271 -- You are receiving this mail because: You are on the CC list for the bug. From vda.linux at googlemail.com Tue Nov 29 13:10:22 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Tue, 29 Nov 2022 14:10:22 +0100 Subject: [git commit] Fix non-Linux builds Message-ID: <20221129131045.18DBB84C4E@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=77216c368f3ae65c3a9fc504d28d3fadd46d6d8d branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master Various tools are Linuxish and should thus only attempted to build on Linux only. Some features are also Linux-only. Also, libresolv is used on all GNU platforms, notably GNU/Hurd and GNU/kfreeBSD. Signed-off-by: Samuel Thibault Signed-off-by: Denys Vlasenko --- Makefile.flags | 2 +- console-tools/loadfont.c | 1 + console-tools/openvt.c | 1 + coreutils/dd.c | 20 ++++++++++++++++++-- klibc-utils/run-init.c | 1 + miscutils/adjtimex.c | 1 + miscutils/i2c_tools.c | 5 +++++ miscutils/partprobe.c | 1 + miscutils/ubirename.c | 1 + miscutils/watchdog.c | 1 + modutils/Config.src | 1 + modutils/depmod.c | 1 + modutils/insmod.c | 1 + modutils/lsmod.c | 1 + modutils/modinfo.c | 1 + modutils/modprobe.c | 1 + modutils/rmmod.c | 1 + networking/arp.c | 1 + networking/arping.c | 1 + networking/brctl.c | 1 + networking/ifconfig.c | 1 + networking/ifplugd.c | 1 + networking/ip.c | 6 ++++++ networking/nameif.c | 1 + networking/route.c | 1 + networking/tc.c | 1 + networking/traceroute.c | 2 ++ networking/tunctl.c | 1 + networking/udhcp/Config.src | 3 +++ procps/free.c | 1 + procps/uptime.c | 1 + sysklogd/klogd.c | 1 + util-linux/acpid.c | 1 + util-linux/blkdiscard.c | 1 + util-linux/blkid.c | 1 + util-linux/dmesg.c | 1 + util-linux/fdisk.c | 1 + util-linux/findfs.c | 1 + util-linux/freeramdisk.c | 2 ++ util-linux/fsfreeze.c | 1 + util-linux/fstrim.c | 1 + util-linux/hwclock.c | 1 + util-linux/ionice.c | 1 + util-linux/losetup.c | 1 + util-linux/mdev.c | 1 + util-linux/mkfs_ext2.c | 1 + util-linux/mkfs_vfat.c | 1 + util-linux/mount.c | 1 + util-linux/nsenter.c | 1 + util-linux/pivot_root.c | 1 + util-linux/setarch.c | 3 +++ util-linux/setpriv.c | 1 + util-linux/swaponoff.c | 2 ++ util-linux/switch_root.c | 1 + util-linux/uevent.c | 1 + util-linux/unshare.c | 1 + 56 files changed, 89 insertions(+), 3 deletions(-) diff --git a/Makefile.flags b/Makefile.flags index 84cb00a75..50137a78e 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -184,7 +184,7 @@ LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=% endif ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y) -ifneq (,$(findstring linux,$(shell $(CC) $(CFLAGS) -dumpmachine))) +ifneq (,$(findstring gnu,$(shell $(CC) $(CFLAGS) -dumpmachine))) LDLIBS += resolv endif endif diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 81a0e6aa8..3f36cabe0 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -12,6 +12,7 @@ //config:config LOADFONT //config: bool "loadfont (5.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: This program loads a console font from standard input. //config: diff --git a/console-tools/openvt.c b/console-tools/openvt.c index db2f073b2..9e6cffecc 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -10,6 +10,7 @@ //config:config OPENVT //config: bool "openvt (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: This program is used to start a command on an unused //config: virtual terminal. diff --git a/coreutils/dd.c b/coreutils/dd.c index 06c1b7b9c..3e034eb1e 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -200,6 +200,7 @@ static void dd_output_status(int UNUSED_PARAM cur_signal) } #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT static int clear_O_DIRECT(int fd) { if (errno == EINVAL) { @@ -211,6 +212,7 @@ static int clear_O_DIRECT(int fd) } return 0; } +# endif #endif static ssize_t dd_read(void *ibuf, size_t ibs) @@ -225,8 +227,10 @@ static ssize_t dd_read(void *ibuf, size_t ibs) #endif n = safe_read(ifd, ibuf, ibs); #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT if (n < 0 && (G.flags & FLAG_IDIRECT) && clear_O_DIRECT(ifd)) goto read_again; +# endif #endif return n; } @@ -239,8 +243,10 @@ static bool write_and_stats(const void *buf, size_t len, size_t obs, IF_FEATURE_DD_IBS_OBS(write_again:) n = full_write(ofd, buf, len); #if ENABLE_FEATURE_DD_IBS_OBS +# ifdef O_DIRECT if (n < 0 && (G.flags & FLAG_ODIRECT) && clear_O_DIRECT(ofd)) goto write_again; +# endif #endif #if ENABLE_FEATURE_DD_THIRD_STATUS_LINE @@ -501,8 +507,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) if (infile) { int iflag = O_RDONLY; #if ENABLE_FEATURE_DD_IBS_OBS - if (G.flags & FLAG_IDIRECT) + if (G.flags & FLAG_IDIRECT) { +# ifdef O_DIRECT iflag |= O_DIRECT; +# else + bb_error_msg_and_die("O_DIRECT not supported on this platform"); +# endif + } #endif xmove_fd(xopen(infile, iflag), ifd); } else { @@ -516,8 +527,13 @@ int dd_main(int argc UNUSED_PARAM, char **argv) if (G.flags & FLAG_APPEND) oflag |= O_APPEND; #if ENABLE_FEATURE_DD_IBS_OBS - if (G.flags & FLAG_ODIRECT) + if (G.flags & FLAG_ODIRECT) { +# ifdef O_DIRECT oflag |= O_DIRECT; +# else + bb_error_msg_and_die("O_DIRECT not supported on this platform"); +# endif + } #endif xmove_fd(xopen(outfile, oflag), ofd); diff --git a/klibc-utils/run-init.c b/klibc-utils/run-init.c index 73c677bab..77fc0e60c 100644 --- a/klibc-utils/run-init.c +++ b/klibc-utils/run-init.c @@ -8,6 +8,7 @@ //config:config RUN_INIT //config: bool "run-init (7.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The run-init utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 209d1d560..c289245c0 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -13,6 +13,7 @@ //config:config ADJTIMEX //config: bool "adjtimex (4.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Adjtimex reads and optionally sets adjustment parameters for //config: the Linux clock adjustment algorithm. diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index da26f5e19..46749fb9c 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c @@ -11,30 +11,35 @@ //config:config I2CGET //config: bool "i2cget (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Read from I2C/SMBus chip registers. //config: //config:config I2CSET //config: bool "i2cset (6.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Set I2C registers. //config: //config:config I2CDUMP //config: bool "i2cdump (7.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Examine I2C registers. //config: //config:config I2CDETECT //config: bool "i2cdetect (7.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Detect I2C chips. //config: //config:config I2CTRANSFER //config: bool "i2ctransfer (4.0 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Send user-defined I2C messages in one transfer. //config: diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c index 0fb1927b7..0abed6ff1 100644 --- a/miscutils/partprobe.c +++ b/miscutils/partprobe.c @@ -7,6 +7,7 @@ //config:config PARTPROBE //config: bool "partprobe (3.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ask kernel to rescan partition table. diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c index 06a0adacf..e7c56640c 100644 --- a/miscutils/ubirename.c +++ b/miscutils/ubirename.c @@ -9,6 +9,7 @@ //config:config UBIRENAME //config: bool "ubirename (2.4 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to rename UBI volumes diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 9f5a4b849..91a20239d 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -11,6 +11,7 @@ //config:config WATCHDOG //config: bool "watchdog (5.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The watchdog utility is used with hardware or software watchdog //config: device drivers. It opens the specified watchdog device special file diff --git a/modutils/Config.src b/modutils/Config.src index 188296814..b8ba3b7b6 100644 --- a/modutils/Config.src +++ b/modutils/Config.src @@ -8,6 +8,7 @@ menu "Linux Module Utilities" config MODPROBE_SMALL bool "Simplified modutils" default y + select PLATFORM_LINUX help Build smaller (~1.5 kbytes), simplified module tools. diff --git a/modutils/depmod.c b/modutils/depmod.c index bb42bbefe..9e39481c5 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -10,6 +10,7 @@ //config:config DEPMOD //config: bool "depmod (27 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: depmod generates modules.dep (and potentially modules.alias //config: and modules.symbols) that contain dependency information diff --git a/modutils/insmod.c b/modutils/insmod.c index 8f7163e25..85b46cdd6 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -9,6 +9,7 @@ //config:config INSMOD //config: bool "insmod (22 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: insmod is used to load specified modules in the running kernel. diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 2beb12362..39dc8e6b7 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -10,6 +10,7 @@ //config:config LSMOD //config: bool "lsmod (1.9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: lsmod is used to display a list of loaded modules. //config: diff --git a/modutils/modinfo.c b/modutils/modinfo.c index 0a86c3296..5d01179a0 100644 --- a/modutils/modinfo.c +++ b/modutils/modinfo.c @@ -8,6 +8,7 @@ //config:config MODINFO //config: bool "modinfo (24 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Show information about a Linux Kernel module diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 235706fd5..77c4bb74d 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -10,6 +10,7 @@ //config:config MODPROBE //config: bool "modprobe (28 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Handle the loading of modules, and their dependencies on a high //config: level. diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 2b3c39153..8d4639f50 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -10,6 +10,7 @@ //config:config RMMOD //config: bool "rmmod (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: rmmod is used to unload specified modules from the kernel. diff --git a/networking/arp.c b/networking/arp.c index 16783ab95..6519f8156 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -15,6 +15,7 @@ //config:config ARP //config: bool "arp (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Manipulate the system ARP cache. diff --git a/networking/arping.c b/networking/arping.c index 86f0221ed..fd0e1b276 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -8,6 +8,7 @@ //config:config ARPING //config: bool "arping (9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ping hosts by ARP packets. diff --git a/networking/brctl.c b/networking/brctl.c index 956bd91f3..b353210d7 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -12,6 +12,7 @@ //config:config BRCTL //config: bool "brctl (4.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Manage ethernet bridges. //config: Supports addbr/delbr and addif/delif. diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 9ee232a66..4090959b8 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -27,6 +27,7 @@ //config:config IFCONFIG //config: bool "ifconfig (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Ifconfig is used to configure the kernel-resident network interfaces. //config: diff --git a/networking/ifplugd.c b/networking/ifplugd.c index 0b55bf4e5..bc4303ef0 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c @@ -9,6 +9,7 @@ //config:config IFPLUGD //config: bool "ifplugd (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Network interface plug detection daemon. diff --git a/networking/ip.c b/networking/ip.c index 7c3208699..23ee7d24b 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -11,6 +11,7 @@ //config:config IP //config: bool "ip (35 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The "ip" applet is a TCP/IP interface configuration and routing //config: utility. @@ -21,6 +22,7 @@ //config:config IPADDR //config: bool "ipaddr (14 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_ADDRESS //config: help //config: Short form of "ip addr" @@ -28,6 +30,7 @@ //config:config IPLINK //config: bool "iplink (17 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_LINK //config: help //config: Short form of "ip link" @@ -35,6 +38,7 @@ //config:config IPROUTE //config: bool "iproute (15 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_ROUTE //config: help //config: Short form of "ip route" @@ -49,6 +53,7 @@ //config:config IPRULE //config: bool "iprule (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_RULE //config: help //config: Short form of "ip rule" @@ -56,6 +61,7 @@ //config:config IPNEIGH //config: bool "ipneigh (8.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_IP_NEIGH //config: help //config: Short form of "ip neigh" diff --git a/networking/nameif.c b/networking/nameif.c index 66e042688..3ccd935b8 100644 --- a/networking/nameif.c +++ b/networking/nameif.c @@ -12,6 +12,7 @@ //config:config NAMEIF //config: bool "nameif (6.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select FEATURE_SYSLOG //config: help //config: nameif is used to rename network interface by its MAC address. diff --git a/networking/route.c b/networking/route.c index 26146f8e9..616572814 100644 --- a/networking/route.c +++ b/networking/route.c @@ -27,6 +27,7 @@ //config:config ROUTE //config: bool "route (8.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Route displays or manipulates the kernel's IP routing tables. diff --git a/networking/tc.c b/networking/tc.c index 43187f7ee..1f4bcce2b 100644 --- a/networking/tc.c +++ b/networking/tc.c @@ -9,6 +9,7 @@ //config:config TC //config: bool "tc (8.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Show / manipulate traffic control settings //config: diff --git a/networking/traceroute.c b/networking/traceroute.c index 4bbe1ab8e..2ba990fd0 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -963,8 +963,10 @@ traceroute_init(int op, char **argv) if (af == AF_INET) { xmove_fd(xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP), rcvsock); #if ENABLE_FEATURE_TRACEROUTE_VERBOSE +# ifdef IP_PKTINFO /* want recvmsg to report target local address (for -v) */ setsockopt_1(rcvsock, IPPROTO_IP, IP_PKTINFO); +# endif #endif } #if ENABLE_TRACEROUTE6 diff --git a/networking/tunctl.c b/networking/tunctl.c index 97e6917aa..59cae331c 100644 --- a/networking/tunctl.c +++ b/networking/tunctl.c @@ -12,6 +12,7 @@ //config:config TUNCTL //config: bool "tunctl (6.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: tunctl creates or deletes tun devices. //config: diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index 8c8c11c26..23e2b40d8 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src @@ -6,6 +6,7 @@ config UDHCPD bool "udhcpd (21 kb)" default y + select PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. @@ -53,6 +54,7 @@ config DUMPLEASES config DHCPRELAY bool "dhcprelay (5.2 kb)" default y + select PLATFORM_LINUX help dhcprelay listens for DHCP requests on one or more interfaces and forwards these requests to a different interface or DHCP @@ -61,6 +63,7 @@ config DHCPRELAY config UDHCPC bool "udhcpc (24 kb)" default y + select PLATFORM_LINUX help udhcpc is a DHCP client geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. diff --git a/procps/free.c b/procps/free.c index 0b68e1b88..c734f757d 100644 --- a/procps/free.c +++ b/procps/free.c @@ -9,6 +9,7 @@ //config:config FREE //config: bool "free (3.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: free displays the total amount of free and used physical and swap //config: memory in the system, as well as the buffers used by the kernel. diff --git a/procps/uptime.c b/procps/uptime.c index 4fd0c9d2d..4992c263e 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -14,6 +14,7 @@ //config:config UPTIME //config: bool "uptime (3.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: uptime gives a one line display of the current time, how long //config: the system has been running, how many users are currently logged diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index df0edee0a..ddf50071d 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -19,6 +19,7 @@ //config:config KLOGD //config: bool "klogd (5.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: klogd is a utility which intercepts and logs all //config: messages from the Linux kernel and sends the messages diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 00613f8e3..7bce8abea 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c @@ -9,6 +9,7 @@ //config:config ACPID //config: bool "acpid (9 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: acpid listens to ACPI events coming either in textual form from //config: /proc/acpi/event (though it is marked deprecated it is still widely diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index 7ac8045f9..2291eec21 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c @@ -8,6 +8,7 @@ //config:config BLKDISCARD //config: bool "blkdiscard (4.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: blkdiscard discards sectors on a given device. diff --git a/util-linux/blkid.c b/util-linux/blkid.c index 4a820771f..008ae5d9e 100644 --- a/util-linux/blkid.c +++ b/util-linux/blkid.c @@ -9,6 +9,7 @@ //config:config BLKID //config: bool "blkid (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Lists labels and UUIDs of all filesystems. diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 6670b84de..5da887f0e 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -11,6 +11,7 @@ //config:config DMESG //config: bool "dmesg (3.7 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: dmesg is used to examine or control the kernel ring buffer. When the //config: Linux kernel prints messages to the system log, they are stored in diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index 20e7d56fa..e9ebbd5d4 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -10,6 +10,7 @@ //config:config FDISK //config: bool "fdisk (37 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The fdisk utility is used to divide hard disks into one or more //config: logical disks, which are generally called partitions. This utility diff --git a/util-linux/findfs.c b/util-linux/findfs.c index f5621a1fa..7ca9dc96b 100644 --- a/util-linux/findfs.c +++ b/util-linux/findfs.c @@ -10,6 +10,7 @@ //config:config FINDFS //config: bool "findfs (12 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Prints the name of a filesystem with given label or UUID. diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 309169d25..d27113d97 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -11,6 +11,7 @@ //config:config FDFLUSH //config: bool "fdflush (1.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: fdflush is only needed when changing media on slightly-broken //config: removable media drives. It is used to make Linux believe that a @@ -23,6 +24,7 @@ //config:config FREERAMDISK //config: bool "freeramdisk (1.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Linux allows you to create ramdisks. This utility allows you to //config: delete them and completely free all memory that was used for the diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c index 6e2ff0a54..fb0b3c4bd 100644 --- a/util-linux/fsfreeze.c +++ b/util-linux/fsfreeze.c @@ -7,6 +7,7 @@ //config:config FSFREEZE //config: bool "fsfreeze (3.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Halt new accesses and flush writes on a mounted filesystem. diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 6d673002f..12bab40d1 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c @@ -10,6 +10,7 @@ //config:config FSTRIM //config: bool "fstrim (4.4 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Discard unused blocks on a mounted filesystem. diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 723b09589..2edadfa4d 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -9,6 +9,7 @@ //config:config HWCLOCK //config: bool "hwclock (5.8 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The hwclock utility is used to read and set the hardware clock //config: on a system. This is primarily used to set the current time on diff --git a/util-linux/ionice.c b/util-linux/ionice.c index 82bd309d1..b30d5f78d 100644 --- a/util-linux/ionice.c +++ b/util-linux/ionice.c @@ -9,6 +9,7 @@ //config:config IONICE //config: bool "ionice (3.8 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Set/set program io scheduling class and priority //config: Requires kernel >= 2.6.13 diff --git a/util-linux/losetup.c b/util-linux/losetup.c index 24f7a2349..ec0cf04e4 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c @@ -9,6 +9,7 @@ //config:config LOSETUP //config: bool "losetup (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: losetup is used to associate or detach a loop device with a regular //config: file or block device, and to query the status of a loop device. This diff --git a/util-linux/mdev.c b/util-linux/mdev.c index ebdc0c254..f6de7ad2a 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -10,6 +10,7 @@ //config:config MDEV //config: bool "mdev (17 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: mdev is a mini-udev implementation for dynamically creating device //config: nodes in the /dev directory. diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index fcf374b2d..892b0867a 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -10,6 +10,7 @@ //config:config MKE2FS //config: bool "mke2fs (10 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to create EXT2 filesystems. //config: diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 821371953..5136446eb 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c @@ -10,6 +10,7 @@ //config:config MKDOSFS //config: bool "mkdosfs (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Utility to create FAT32 filesystems. //config: diff --git a/util-linux/mount.c b/util-linux/mount.c index 4e65b6b46..e3aeda666 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -20,6 +20,7 @@ //config:config MOUNT //config: bool "mount (23 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: All files and filesystems in Unix are arranged into one big directory //config: tree. The 'mount' utility is used to graft a filesystem onto a diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c index 1aa045b35..8652e803a 100644 --- a/util-linux/nsenter.c +++ b/util-linux/nsenter.c @@ -9,6 +9,7 @@ //config:config NSENTER //config: bool "nsenter (6.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Run program with namespaces of other processes. diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index ecc891100..41f29da32 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -11,6 +11,7 @@ //config:config PIVOT_ROOT //config: bool "pivot_root (1.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The pivot_root utility swaps the mount points for the root filesystem //config: with some other mounted filesystem. This allows you to do all sorts diff --git a/util-linux/setarch.c b/util-linux/setarch.c index cf8ef0064..57051a683 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c @@ -9,6 +9,7 @@ //config:config SETARCH //config: bool "setarch (3.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The linux32 utility is used to create a 32bit environment for the //config: specified program (usually a shell). It only makes sense to have @@ -18,12 +19,14 @@ //config:config LINUX32 //config: bool "linux32 (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux32". //config: //config:config LINUX64 //config: bool "linux64 (3.3 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux64". diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c index 6904cf019..bfe2c7a7a 100644 --- a/util-linux/setpriv.c +++ b/util-linux/setpriv.c @@ -9,6 +9,7 @@ //config:config SETPRIV //config: bool "setpriv (6.6 kb)" //config: default y +//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Run a program with different Linux privilege settings. diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index e2ff4b5cc..567869cc7 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -9,6 +9,7 @@ //config:config SWAPON //config: bool "swapon (15 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: Once you have created some swap space using 'mkswap', you also need //config: to enable your swap space with the 'swapon' utility. The 'swapoff' @@ -35,6 +36,7 @@ //config:config SWAPOFF //config: bool "swapoff (14 kb)" //config: default y +//config: select PLATFORM_LINUX //config: //config:config FEATURE_SWAPONOFF_LABEL //config: bool "Support specifying devices by label or UUID" diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index 901c0b8db..f61002236 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -9,6 +9,7 @@ //config:config SWITCH_ROOT //config: bool "switch_root (5.5 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: The switch_root utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/util-linux/uevent.c b/util-linux/uevent.c index db11746d0..bd39c3acd 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c @@ -6,6 +6,7 @@ //config:config UEVENT //config: bool "uevent (3.1 kb)" //config: default y +//config: select PLATFORM_LINUX //config: help //config: uevent is a netlink listener for kernel uevent notifications //config: sent via netlink. It is usually used for dynamic device creation. diff --git a/util-linux/unshare.c b/util-linux/unshare.c index 06b938074..156a96d94 100644 --- a/util-linux/unshare.c +++ b/util-linux/unshare.c @@ -9,6 +9,7 @@ //config:config UNSHARE //config: bool "unshare (7.2 kb)" //config: default y +//config: select PLATFORM_LINUX //config: depends on !NOMMU //config: select LONG_OPTS //config: help From vda.linux at googlemail.com Tue Nov 29 13:14:06 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Tue, 29 Nov 2022 14:14:06 +0100 Subject: [git commit] Remove "select PLATFORM_LINUX" Message-ID: <20221129131416.7CAB984C52@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=99476502f926fb6e5d61126c3b672f3f6f357d5d branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master Signed-off-by: Denys Vlasenko --- console-tools/loadfont.c | 1 - console-tools/openvt.c | 1 - klibc-utils/run-init.c | 1 - miscutils/adjtimex.c | 1 - miscutils/i2c_tools.c | 5 ----- miscutils/partprobe.c | 1 - miscutils/ubirename.c | 1 - miscutils/watchdog.c | 1 - modutils/Config.src | 1 - modutils/depmod.c | 1 - modutils/insmod.c | 1 - modutils/lsmod.c | 1 - modutils/modinfo.c | 1 - modutils/modprobe.c | 1 - modutils/rmmod.c | 1 - networking/arp.c | 1 - networking/arping.c | 1 - networking/brctl.c | 1 - networking/ifconfig.c | 1 - networking/ifplugd.c | 1 - networking/ip.c | 6 ------ networking/nameif.c | 1 - networking/route.c | 1 - networking/tc.c | 1 - networking/traceroute.c | 2 -- networking/tunctl.c | 1 - networking/udhcp/Config.src | 3 --- procps/free.c | 1 - procps/uptime.c | 1 - sysklogd/klogd.c | 1 - util-linux/acpid.c | 1 - util-linux/blkdiscard.c | 1 - util-linux/blkid.c | 1 - util-linux/dmesg.c | 1 - util-linux/fdisk.c | 1 - util-linux/findfs.c | 1 - util-linux/freeramdisk.c | 2 -- util-linux/fsfreeze.c | 1 - util-linux/fstrim.c | 1 - util-linux/hwclock.c | 1 - util-linux/ionice.c | 1 - util-linux/losetup.c | 1 - util-linux/mdev.c | 1 - util-linux/mkfs_ext2.c | 1 - util-linux/mkfs_vfat.c | 1 - util-linux/mount.c | 1 - util-linux/nsenter.c | 1 - util-linux/pivot_root.c | 1 - util-linux/setarch.c | 3 --- util-linux/setpriv.c | 1 - util-linux/swaponoff.c | 2 -- util-linux/switch_root.c | 1 - util-linux/uevent.c | 1 - util-linux/unshare.c | 1 - 54 files changed, 70 deletions(-) diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 3f36cabe0..81a0e6aa8 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -12,7 +12,6 @@ //config:config LOADFONT //config: bool "loadfont (5.2 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: This program loads a console font from standard input. //config: diff --git a/console-tools/openvt.c b/console-tools/openvt.c index 9e6cffecc..db2f073b2 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -10,7 +10,6 @@ //config:config OPENVT //config: bool "openvt (7.2 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: This program is used to start a command on an unused //config: virtual terminal. diff --git a/klibc-utils/run-init.c b/klibc-utils/run-init.c index 77fc0e60c..73c677bab 100644 --- a/klibc-utils/run-init.c +++ b/klibc-utils/run-init.c @@ -8,7 +8,6 @@ //config:config RUN_INIT //config: bool "run-init (7.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The run-init utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index c289245c0..209d1d560 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -13,7 +13,6 @@ //config:config ADJTIMEX //config: bool "adjtimex (4.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Adjtimex reads and optionally sets adjustment parameters for //config: the Linux clock adjustment algorithm. diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index 46749fb9c..da26f5e19 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c @@ -11,35 +11,30 @@ //config:config I2CGET //config: bool "i2cget (5.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Read from I2C/SMBus chip registers. //config: //config:config I2CSET //config: bool "i2cset (6.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Set I2C registers. //config: //config:config I2CDUMP //config: bool "i2cdump (7.1 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Examine I2C registers. //config: //config:config I2CDETECT //config: bool "i2cdetect (7.1 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Detect I2C chips. //config: //config:config I2CTRANSFER //config: bool "i2ctransfer (4.0 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Send user-defined I2C messages in one transfer. //config: diff --git a/miscutils/partprobe.c b/miscutils/partprobe.c index 0abed6ff1..0fb1927b7 100644 --- a/miscutils/partprobe.c +++ b/miscutils/partprobe.c @@ -7,7 +7,6 @@ //config:config PARTPROBE //config: bool "partprobe (3.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Ask kernel to rescan partition table. diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c index e7c56640c..06a0adacf 100644 --- a/miscutils/ubirename.c +++ b/miscutils/ubirename.c @@ -9,7 +9,6 @@ //config:config UBIRENAME //config: bool "ubirename (2.4 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Utility to rename UBI volumes diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 91a20239d..9f5a4b849 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -11,7 +11,6 @@ //config:config WATCHDOG //config: bool "watchdog (5.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The watchdog utility is used with hardware or software watchdog //config: device drivers. It opens the specified watchdog device special file diff --git a/modutils/Config.src b/modutils/Config.src index b8ba3b7b6..188296814 100644 --- a/modutils/Config.src +++ b/modutils/Config.src @@ -8,7 +8,6 @@ menu "Linux Module Utilities" config MODPROBE_SMALL bool "Simplified modutils" default y - select PLATFORM_LINUX help Build smaller (~1.5 kbytes), simplified module tools. diff --git a/modutils/depmod.c b/modutils/depmod.c index 9e39481c5..bb42bbefe 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c @@ -10,7 +10,6 @@ //config:config DEPMOD //config: bool "depmod (27 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: depmod generates modules.dep (and potentially modules.alias //config: and modules.symbols) that contain dependency information diff --git a/modutils/insmod.c b/modutils/insmod.c index 85b46cdd6..8f7163e25 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -9,7 +9,6 @@ //config:config INSMOD //config: bool "insmod (22 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: insmod is used to load specified modules in the running kernel. diff --git a/modutils/lsmod.c b/modutils/lsmod.c index 39dc8e6b7..2beb12362 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c @@ -10,7 +10,6 @@ //config:config LSMOD //config: bool "lsmod (1.9 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: lsmod is used to display a list of loaded modules. //config: diff --git a/modutils/modinfo.c b/modutils/modinfo.c index 5d01179a0..0a86c3296 100644 --- a/modutils/modinfo.c +++ b/modutils/modinfo.c @@ -8,7 +8,6 @@ //config:config MODINFO //config: bool "modinfo (24 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Show information about a Linux Kernel module diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 77c4bb74d..235706fd5 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c @@ -10,7 +10,6 @@ //config:config MODPROBE //config: bool "modprobe (28 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Handle the loading of modules, and their dependencies on a high //config: level. diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 8d4639f50..2b3c39153 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c @@ -10,7 +10,6 @@ //config:config RMMOD //config: bool "rmmod (3.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: rmmod is used to unload specified modules from the kernel. diff --git a/networking/arp.c b/networking/arp.c index 6519f8156..16783ab95 100644 --- a/networking/arp.c +++ b/networking/arp.c @@ -15,7 +15,6 @@ //config:config ARP //config: bool "arp (10 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Manipulate the system ARP cache. diff --git a/networking/arping.c b/networking/arping.c index fd0e1b276..86f0221ed 100644 --- a/networking/arping.c +++ b/networking/arping.c @@ -8,7 +8,6 @@ //config:config ARPING //config: bool "arping (9 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Ping hosts by ARP packets. diff --git a/networking/brctl.c b/networking/brctl.c index b353210d7..956bd91f3 100644 --- a/networking/brctl.c +++ b/networking/brctl.c @@ -12,7 +12,6 @@ //config:config BRCTL //config: bool "brctl (4.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Manage ethernet bridges. //config: Supports addbr/delbr and addif/delif. diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 4090959b8..9ee232a66 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -27,7 +27,6 @@ //config:config IFCONFIG //config: bool "ifconfig (12 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Ifconfig is used to configure the kernel-resident network interfaces. //config: diff --git a/networking/ifplugd.c b/networking/ifplugd.c index bc4303ef0..0b55bf4e5 100644 --- a/networking/ifplugd.c +++ b/networking/ifplugd.c @@ -9,7 +9,6 @@ //config:config IFPLUGD //config: bool "ifplugd (10 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Network interface plug detection daemon. diff --git a/networking/ip.c b/networking/ip.c index 23ee7d24b..7c3208699 100644 --- a/networking/ip.c +++ b/networking/ip.c @@ -11,7 +11,6 @@ //config:config IP //config: bool "ip (35 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The "ip" applet is a TCP/IP interface configuration and routing //config: utility. @@ -22,7 +21,6 @@ //config:config IPADDR //config: bool "ipaddr (14 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_IP_ADDRESS //config: help //config: Short form of "ip addr" @@ -30,7 +28,6 @@ //config:config IPLINK //config: bool "iplink (17 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_IP_LINK //config: help //config: Short form of "ip link" @@ -38,7 +35,6 @@ //config:config IPROUTE //config: bool "iproute (15 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_IP_ROUTE //config: help //config: Short form of "ip route" @@ -53,7 +49,6 @@ //config:config IPRULE //config: bool "iprule (10 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_IP_RULE //config: help //config: Short form of "ip rule" @@ -61,7 +56,6 @@ //config:config IPNEIGH //config: bool "ipneigh (8.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_IP_NEIGH //config: help //config: Short form of "ip neigh" diff --git a/networking/nameif.c b/networking/nameif.c index 3ccd935b8..66e042688 100644 --- a/networking/nameif.c +++ b/networking/nameif.c @@ -12,7 +12,6 @@ //config:config NAMEIF //config: bool "nameif (6.6 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select FEATURE_SYSLOG //config: help //config: nameif is used to rename network interface by its MAC address. diff --git a/networking/route.c b/networking/route.c index 616572814..26146f8e9 100644 --- a/networking/route.c +++ b/networking/route.c @@ -27,7 +27,6 @@ //config:config ROUTE //config: bool "route (8.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Route displays or manipulates the kernel's IP routing tables. diff --git a/networking/tc.c b/networking/tc.c index 1f4bcce2b..43187f7ee 100644 --- a/networking/tc.c +++ b/networking/tc.c @@ -9,7 +9,6 @@ //config:config TC //config: bool "tc (8.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Show / manipulate traffic control settings //config: diff --git a/networking/traceroute.c b/networking/traceroute.c index 2ba990fd0..4bbe1ab8e 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -963,10 +963,8 @@ traceroute_init(int op, char **argv) if (af == AF_INET) { xmove_fd(xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP), rcvsock); #if ENABLE_FEATURE_TRACEROUTE_VERBOSE -# ifdef IP_PKTINFO /* want recvmsg to report target local address (for -v) */ setsockopt_1(rcvsock, IPPROTO_IP, IP_PKTINFO); -# endif #endif } #if ENABLE_TRACEROUTE6 diff --git a/networking/tunctl.c b/networking/tunctl.c index 59cae331c..97e6917aa 100644 --- a/networking/tunctl.c +++ b/networking/tunctl.c @@ -12,7 +12,6 @@ //config:config TUNCTL //config: bool "tunctl (6.2 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: tunctl creates or deletes tun devices. //config: diff --git a/networking/udhcp/Config.src b/networking/udhcp/Config.src index 23e2b40d8..8c8c11c26 100644 --- a/networking/udhcp/Config.src +++ b/networking/udhcp/Config.src @@ -6,7 +6,6 @@ config UDHCPD bool "udhcpd (21 kb)" default y - select PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. @@ -54,7 +53,6 @@ config DUMPLEASES config DHCPRELAY bool "dhcprelay (5.2 kb)" default y - select PLATFORM_LINUX help dhcprelay listens for DHCP requests on one or more interfaces and forwards these requests to a different interface or DHCP @@ -63,7 +61,6 @@ config DHCPRELAY config UDHCPC bool "udhcpc (24 kb)" default y - select PLATFORM_LINUX help udhcpc is a DHCP client geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. diff --git a/procps/free.c b/procps/free.c index c734f757d..0b68e1b88 100644 --- a/procps/free.c +++ b/procps/free.c @@ -9,7 +9,6 @@ //config:config FREE //config: bool "free (3.1 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: free displays the total amount of free and used physical and swap //config: memory in the system, as well as the buffers used by the kernel. diff --git a/procps/uptime.c b/procps/uptime.c index 4992c263e..4fd0c9d2d 100644 --- a/procps/uptime.c +++ b/procps/uptime.c @@ -14,7 +14,6 @@ //config:config UPTIME //config: bool "uptime (3.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: uptime gives a one line display of the current time, how long //config: the system has been running, how many users are currently logged diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index ddf50071d..df0edee0a 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -19,7 +19,6 @@ //config:config KLOGD //config: bool "klogd (5.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: klogd is a utility which intercepts and logs all //config: messages from the Linux kernel and sends the messages diff --git a/util-linux/acpid.c b/util-linux/acpid.c index 7bce8abea..00613f8e3 100644 --- a/util-linux/acpid.c +++ b/util-linux/acpid.c @@ -9,7 +9,6 @@ //config:config ACPID //config: bool "acpid (9 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: acpid listens to ACPI events coming either in textual form from //config: /proc/acpi/event (though it is marked deprecated it is still widely diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c index 2291eec21..7ac8045f9 100644 --- a/util-linux/blkdiscard.c +++ b/util-linux/blkdiscard.c @@ -8,7 +8,6 @@ //config:config BLKDISCARD //config: bool "blkdiscard (4.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: blkdiscard discards sectors on a given device. diff --git a/util-linux/blkid.c b/util-linux/blkid.c index 008ae5d9e..4a820771f 100644 --- a/util-linux/blkid.c +++ b/util-linux/blkid.c @@ -9,7 +9,6 @@ //config:config BLKID //config: bool "blkid (12 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Lists labels and UUIDs of all filesystems. diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index 5da887f0e..6670b84de 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c @@ -11,7 +11,6 @@ //config:config DMESG //config: bool "dmesg (3.7 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: dmesg is used to examine or control the kernel ring buffer. When the //config: Linux kernel prints messages to the system log, they are stored in diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index e9ebbd5d4..20e7d56fa 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -10,7 +10,6 @@ //config:config FDISK //config: bool "fdisk (37 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The fdisk utility is used to divide hard disks into one or more //config: logical disks, which are generally called partitions. This utility diff --git a/util-linux/findfs.c b/util-linux/findfs.c index 7ca9dc96b..f5621a1fa 100644 --- a/util-linux/findfs.c +++ b/util-linux/findfs.c @@ -10,7 +10,6 @@ //config:config FINDFS //config: bool "findfs (12 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select VOLUMEID //config: help //config: Prints the name of a filesystem with given label or UUID. diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index d27113d97..309169d25 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -11,7 +11,6 @@ //config:config FDFLUSH //config: bool "fdflush (1.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: fdflush is only needed when changing media on slightly-broken //config: removable media drives. It is used to make Linux believe that a @@ -24,7 +23,6 @@ //config:config FREERAMDISK //config: bool "freeramdisk (1.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Linux allows you to create ramdisks. This utility allows you to //config: delete them and completely free all memory that was used for the diff --git a/util-linux/fsfreeze.c b/util-linux/fsfreeze.c index fb0b3c4bd..6e2ff0a54 100644 --- a/util-linux/fsfreeze.c +++ b/util-linux/fsfreeze.c @@ -7,7 +7,6 @@ //config:config FSFREEZE //config: bool "fsfreeze (3.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Halt new accesses and flush writes on a mounted filesystem. diff --git a/util-linux/fstrim.c b/util-linux/fstrim.c index 12bab40d1..6d673002f 100644 --- a/util-linux/fstrim.c +++ b/util-linux/fstrim.c @@ -10,7 +10,6 @@ //config:config FSTRIM //config: bool "fstrim (4.4 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Discard unused blocks on a mounted filesystem. diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 2edadfa4d..723b09589 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c @@ -9,7 +9,6 @@ //config:config HWCLOCK //config: bool "hwclock (5.8 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The hwclock utility is used to read and set the hardware clock //config: on a system. This is primarily used to set the current time on diff --git a/util-linux/ionice.c b/util-linux/ionice.c index b30d5f78d..82bd309d1 100644 --- a/util-linux/ionice.c +++ b/util-linux/ionice.c @@ -9,7 +9,6 @@ //config:config IONICE //config: bool "ionice (3.8 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Set/set program io scheduling class and priority //config: Requires kernel >= 2.6.13 diff --git a/util-linux/losetup.c b/util-linux/losetup.c index ec0cf04e4..24f7a2349 100644 --- a/util-linux/losetup.c +++ b/util-linux/losetup.c @@ -9,7 +9,6 @@ //config:config LOSETUP //config: bool "losetup (5.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: losetup is used to associate or detach a loop device with a regular //config: file or block device, and to query the status of a loop device. This diff --git a/util-linux/mdev.c b/util-linux/mdev.c index f6de7ad2a..ebdc0c254 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -10,7 +10,6 @@ //config:config MDEV //config: bool "mdev (17 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: mdev is a mini-udev implementation for dynamically creating device //config: nodes in the /dev directory. diff --git a/util-linux/mkfs_ext2.c b/util-linux/mkfs_ext2.c index 892b0867a..fcf374b2d 100644 --- a/util-linux/mkfs_ext2.c +++ b/util-linux/mkfs_ext2.c @@ -10,7 +10,6 @@ //config:config MKE2FS //config: bool "mke2fs (10 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Utility to create EXT2 filesystems. //config: diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 5136446eb..821371953 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c @@ -10,7 +10,6 @@ //config:config MKDOSFS //config: bool "mkdosfs (7.2 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Utility to create FAT32 filesystems. //config: diff --git a/util-linux/mount.c b/util-linux/mount.c index e3aeda666..4e65b6b46 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -20,7 +20,6 @@ //config:config MOUNT //config: bool "mount (23 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: All files and filesystems in Unix are arranged into one big directory //config: tree. The 'mount' utility is used to graft a filesystem onto a diff --git a/util-linux/nsenter.c b/util-linux/nsenter.c index 8652e803a..1aa045b35 100644 --- a/util-linux/nsenter.c +++ b/util-linux/nsenter.c @@ -9,7 +9,6 @@ //config:config NSENTER //config: bool "nsenter (6.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Run program with namespaces of other processes. diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c index 41f29da32..ecc891100 100644 --- a/util-linux/pivot_root.c +++ b/util-linux/pivot_root.c @@ -11,7 +11,6 @@ //config:config PIVOT_ROOT //config: bool "pivot_root (1.1 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The pivot_root utility swaps the mount points for the root filesystem //config: with some other mounted filesystem. This allows you to do all sorts diff --git a/util-linux/setarch.c b/util-linux/setarch.c index 57051a683..cf8ef0064 100644 --- a/util-linux/setarch.c +++ b/util-linux/setarch.c @@ -9,7 +9,6 @@ //config:config SETARCH //config: bool "setarch (3.6 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The linux32 utility is used to create a 32bit environment for the //config: specified program (usually a shell). It only makes sense to have @@ -19,14 +18,12 @@ //config:config LINUX32 //config: bool "linux32 (3.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux32". //config: //config:config LINUX64 //config: bool "linux64 (3.3 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Alias to "setarch linux64". diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c index bfe2c7a7a..6904cf019 100644 --- a/util-linux/setpriv.c +++ b/util-linux/setpriv.c @@ -9,7 +9,6 @@ //config:config SETPRIV //config: bool "setpriv (6.6 kb)" //config: default y -//config: select PLATFORM_LINUX //config: select LONG_OPTS //config: help //config: Run a program with different Linux privilege settings. diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 567869cc7..e2ff4b5cc 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -9,7 +9,6 @@ //config:config SWAPON //config: bool "swapon (15 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: Once you have created some swap space using 'mkswap', you also need //config: to enable your swap space with the 'swapon' utility. The 'swapoff' @@ -36,7 +35,6 @@ //config:config SWAPOFF //config: bool "swapoff (14 kb)" //config: default y -//config: select PLATFORM_LINUX //config: //config:config FEATURE_SWAPONOFF_LABEL //config: bool "Support specifying devices by label or UUID" diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c index f61002236..901c0b8db 100644 --- a/util-linux/switch_root.c +++ b/util-linux/switch_root.c @@ -9,7 +9,6 @@ //config:config SWITCH_ROOT //config: bool "switch_root (5.5 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: The switch_root utility is used from initramfs to select a new //config: root device. Under initramfs, you have to use this instead of diff --git a/util-linux/uevent.c b/util-linux/uevent.c index bd39c3acd..db11746d0 100644 --- a/util-linux/uevent.c +++ b/util-linux/uevent.c @@ -6,7 +6,6 @@ //config:config UEVENT //config: bool "uevent (3.1 kb)" //config: default y -//config: select PLATFORM_LINUX //config: help //config: uevent is a netlink listener for kernel uevent notifications //config: sent via netlink. It is usually used for dynamic device creation. diff --git a/util-linux/unshare.c b/util-linux/unshare.c index 156a96d94..06b938074 100644 --- a/util-linux/unshare.c +++ b/util-linux/unshare.c @@ -9,7 +9,6 @@ //config:config UNSHARE //config: bool "unshare (7.2 kb)" //config: default y -//config: select PLATFORM_LINUX //config: depends on !NOMMU //config: select LONG_OPTS //config: help From vda.linux at googlemail.com Tue Nov 29 13:44:39 2022 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Tue, 29 Nov 2022 14:44:39 +0100 Subject: [git commit] unzip -l: add missed big-endian conversions date and time Message-ID: <20221129134453.72FB684C72@busybox.osuosl.org> commit: https://git.busybox.net/busybox/commit/?id=7ade421b1a410f4d2d2314f06d7f5a9d0fd123ec branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master When calling unzip -l the date and time output was missing big-endian conversions. Signed-off-by: Peter Kaestle Signed-off-by: Denys Vlasenko --- archival/unzip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archival/unzip.c b/archival/unzip.c index fc92ac661..b27dd2187 100644 --- a/archival/unzip.c +++ b/archival/unzip.c @@ -118,6 +118,8 @@ typedef union { #define FIX_ENDIANNESS_ZIP(zip) \ do { if (BB_BIG_ENDIAN) { \ (zip).fmt.method = SWAP_LE16((zip).fmt.method ); \ + (zip).fmt.modtime = SWAP_LE16((zip).fmt.modtime ); \ + (zip).fmt.moddate = SWAP_LE16((zip).fmt.moddate ); \ (zip).fmt.crc32 = SWAP_LE32((zip).fmt.crc32 ); \ (zip).fmt.cmpsize = SWAP_LE32((zip).fmt.cmpsize ); \ (zip).fmt.ucmpsize = SWAP_LE32((zip).fmt.ucmpsize ); \