aboutsummaryrefslogtreecommitdiff
path: root/console-tools/setlogcons.c (unfollow)
Commit message (Collapse)AuthorFilesLines
10 daystls: rewrite Schannel codeRFL8902-268/+283
The previous code had issues with buffer management, resulting in failures.
12 daysls: add '-g' and '-C' to usage messageRon Yorston1-0/+5
For some reason upstream doesn't include the '-g' option in the usage message for 'ls'. Commit 551bfdb97 (ls: implement -q, fix -w0, reduce startup time) added a description but left it commented out. It didn't add 'g' to the list of options. 'C' appears in the list but its description is commented out. Adds 24-32 bytes. (GitHub issue #517)
2025-08-22lineedit: fix PS1='\W' for root directoryRon Yorston1-1/+1
An upstream bug caused '\W' to return an empty string for the root directory of any drive. bash displays '/' in similar circumstances on Linux. Adds 16 bytes. (GitHub issue #516)
2025-08-21tr: an escaped dash doesn't indicate a rangeRon Yorston2-0/+11
Upstream commit d683c5c2f1 (tr: support octal ranges) broke the previous behaviour that an escaped dash doesn't indicate a range: '[p\-r]' should match 'p', '-' or 'r', not 'p', 'q' or 'r'. Add a special case to handle this. Adds 16 bytes. (GitHub issue #515)
2025-08-18tls: various schannel fixesRFL8901-135/+61
2025-08-17win32: fix return value of isatty()Ron Yorston1-1/+1
Changes to the ls applet upstream assumed that the return value of isatty() followed the C standard and would be 0 or 1. The wrapper for Windows' _isatty() didn't allow for it returning a non-zero value for a tty, not 1. This confused ls. Fix the wrapper. (GitHub issue #513)
2025-08-12Use Windows API for checksums on ARM64Ron Yorston1-1/+1
The ARM64 build had native Windows support for TLS by default, but not checksums. Add this, so the ARM 64 build matches the Unicode build.
2025-08-12Post-merge fixesRon Yorston3-7/+88
Upstream has moved some functions from networking/tls.c to a new file, libbb/hash_hmac.c. The merge didn't adjust this code to allow it to work with the native Windows checksum API. This only matters if FEATURE_USE_CNG_API is enabled and CONFIG_FEATURE_TLS_SCHANNEL isn't. In that case the wget applet fails to handle https. None of the default configurations has this combination, but it should work. Make it so. The Windows code doesn't implement hmac_block(), as that's only used for password encryption which isn't currently supported. The variadic function hmac_peek_hash() isn't declared FAST_FUNC, as that causes clang to issue many warnings.
2025-08-10tls: only show schannel config option on mingwrfl8901-1/+1
2025-08-09ash: fix fallout of no-more-set commandnamebusyboxDenys Vlasenko1-6/+7
Testsuite reports lots of message mismatches, fix that Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-09shells: fix a typo in var_backslash1.tests, expand it while at itDenys Vlasenko4-8/+12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-09ash: eval: Always set exitstatus in evaltreeDenys Vlasenko1-6/+7
Upstream commit: Date: Tue, 6 Dec 2022 16:49:14 +0800 eval: Always set exitstatus in evaltree There is no harm in setting exitstatus unconditionally in evaltree. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-09ash: options: Do not set commandname in procargsDenys Vlasenko1-3/+2
Upstream commit: Date: Mon Feb 25 12:49:20 2019 +0800 options: Do not set commandname in procargs We set commandname in procargs when we don't have to. This results in a duplicated output of arg0 when an error occurs. function old new delta ash_main 1256 1236 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-09ash: jobs: drop unused node parameter in makejob()Denys Vlasenko1-6/+6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-09shells: add testsuite itemDenys Vlasenko4-0/+124
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-08ash: reuse vstype_suffix[] in debug code, shrink itDenys Vlasenko1-35/+37
function old new delta vstype_suffix - 39 +39 static.vstype 42 - -42 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/0 up/down: 39/-42) Total: -3 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-08tls: change build defaultsRon Yorston4-4/+16
Update the default build configurations to enable the native TLS library in the 64-bit Unicode and ARM64 builds.
2025-08-08tls: whitespace fixesRon Yorston5-8/+8
No functional changes.
2025-08-08tls: fix schannel handshake on older WindowsRFL8901-1/+1
2025-08-07ash: fix cmdputs - was showing some variable forms incorrectlyDenys Vlasenko1-20/+35
function old new delta cmdputs 402 418 +16 static.vstype 48 42 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-6) Total: 10 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-07stty: fix build for Windows XPRon Yorston1-0/+10
The ioctl() to get the size of the terminal windows used functions which weren't available on Windows XP. Load these dynamically to avoid failure. Adds 160 bytes.
2025-08-07tls: add Schannel implementationrfl8906-14/+635
Not enabled by default. When enabled without TLS 1.3 support, saves 16784-18776 bytes. (GitHub PR #510)
2025-08-07hush: smarter optimization for not-globbing [ and [[Denys Vlasenko1-37/+23
function old new delta o_save_ptr 176 167 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-07ash: fix heredoc.tests broken by last commitDenys Vlasenko1-15/+19
function old new delta readtoken1 3053 3095 +42 xxreadtoken 215 212 -3 expandstr 255 252 -3 parseheredoc 148 127 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 42/-27) Total: 15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-07ash,hush: fix corner cases with backslash-newlines in heredocsDenys Vlasenko14-5/+44
function old new delta fetch_heredocs 477 485 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-07hush: optimization: do not glob words "[" and "[["Denys Vlasenko1-0/+40
function old new delta glob_needed 71 86 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06showkey: make -a, -k, -s mutually exclusiveDenys Vlasenko1-2/+2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06top,pmap: speed up /smaps parsingDenys Vlasenko3-24/+49
function old new delta procps_read_smaps 515 529 +14 procps_get_maps 685 665 -20 .rodata 105847 105820 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-47) Total: -33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06libbb: fix too-narrow variable in procps_read_smaps() causing incorrect sizesDenys Vlasenko1-1/+1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06libbb: make read_cmdline() replace chars 1..31 with '?', not spaceDenys Vlasenko2-7/+11
Space was too inconspicuous on output Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06top: simplify command line readingDenys Vlasenko2-18/+26
function old new delta cmdline_to_line_buf_and_print - 48 +48 read_cmdline 326 327 +1 display_topmem_process_list 523 505 -18 display_process_list 1186 1161 -25 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/2 up/down: 49/-43) Total: 6 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-06top: disentangle printing logicDenys Vlasenko1-83/+97
function old new delta print_line_buf - 78 +78 print_line_bold - 50 +50 top_main 1043 1091 +48 handle_input 708 714 +6 do_stats 186 192 +6 .rodata 115543 115526 -17 display_topmem_process_list 748 523 -225 display_process_list 1432 1186 -246 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/3 up/down: 188/-488) Total: -300 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: consistently NOT use the last column of the displayDenys Vlasenko1-56/+51
function old new delta .rodata 115537 115543 +6 top_main 1047 1043 -4 display_process_list 1459 1432 -27 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 6/-31) Total: -25 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05pmap: increase max handled command line length to 4kDenys Vlasenko1-5/+7
function old new delta procps_get_maps 181 779 +598 read_smaps 563 - -563 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/0 up/down: 598/-563) Total: 35 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top,pmap: do not use common code for reading /proc/PID/smapsDenys Vlasenko4-131/+178
The logic is in fact quite far from common. While at it, stop accounting "---p" mappings as mapped (e.g. VSZ in top). Nothing is mapped there (why would kernel waste RAM to map pages which can't be accessed?). function old new delta read_smaps - 562 +562 read_cmdline 315 326 +11 print_smaprec 97 101 +4 procps_scan 1219 1211 -8 .rodata 115541 115533 -8 skip_whitespace_if_prefixed_with 25 - -25 procps_read_smaps 864 577 -287 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 2/3 up/down: 577/-328) Total: 249 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: improve response time to keyboard inputDenys Vlasenko1-14/+27
function old new delta handle_input 674 708 +34 top_main 1019 1047 +28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 62/0) Total: 62 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: reduce flicker: redraw screen with "clear to EOL" commands, not one ↵Denys Vlasenko1-14/+20
"clear screen" function old new delta display_topmem_process_list 680 748 +68 display_process_list 1403 1459 +56 .rodata 115512 115541 +29 top_main 1014 1019 +5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 158/0) Total: 158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: make uppercase 'S' walk topmem in opposite directionDenys Vlasenko1-1/+8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: show RSS instead of VSF, virtual mapped size is often meaninglessDenys Vlasenko1-15/+15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: fix display of very large VSZDenys Vlasenko2-5/+37
function old new delta display_process_list 1366 1403 +37 handle_input 628 636 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 45/0) Total: 45 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-05top: do not rescan processes on second 's'Denys Vlasenko1-1/+3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-04libbb: simplify concat_path_file()Denys Vlasenko1-2/+2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-04libbb: much faster concat_path_file()Denys Vlasenko3-2/+77
function old new delta concat_path_file 68 127 +59 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03shell: typo and whitespace fixes, no code changesDenys Vlasenko2-16/+2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03hush: fix memory leak caused by compiler optimizing out a storeDenys Vlasenko2-25/+84
function old new delta generate_stream_from_string 222 232 +10 setup_heredoc 329 330 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0) Total: 11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03hush: disentangle interactiveness/job_control setup codeDenys Vlasenko1-79/+67
...and discover that we can do away with 1-3 initialization syscalls. function old new delta hush_main 1152 1146 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03hush: fix build failure if !CONFIG_HUSH_JOBDenys Vlasenko1-2/+2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03hush: make NORETURN declarations lees verbose, no code changesDenys Vlasenko1-22/+6
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03hush: do not save history on xfunc error, it's unsafeDenys Vlasenko1-47/+37
Also, make second calls to install_special_sighandlers() less haphazard. It's not a fix for anything, but looking more organized now. function old new delta fflush_restore_ttypgrp_and__exit - 20 +20 restore_ttypgrp_and__exit 21 - -21 hush_main 1181 1152 -29 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 20/-50) Total: -30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2025-08-03docs: Add links to cmd description from cmd listNoelle Leigh2-7/+14
In the generated `docs/busybox.pod` file, add a link for each command in the big command list that goes to that command's description, like a compact table of contents. This seems to only affect the generated HTML version of the usage page. To add `id` attributes to each usage section title, each command now uses `=head2` instead of `=item` for their section heading. To add links to each command in the list, the list was unindented so that it could use rich text, and each command was marked as code text (C<>) so they are styled in monospace. These changes mean that the HTML and mandoc command list will expand to fit the available width of the viewport, rather than wrapping at a fixed line-length. The plain text version retains its existing wrapping behavior. Because of the new code text formatting, `--quotes=none` was added to the pod2man and pod2text invocations in Makefile.custom to prevent the command list from quoting every single command. Signed-off-by: Noelle Leigh <noelle@noelle.dev> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>