aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * traceroute: fix option parsingDenys Vlasenko2021-02-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * update_passwd: fix context variableBernd Kuhls2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit https://git.busybox.net/busybox/commit/libbb/update_passwd.c?id=2496616b0a8d1c80cd1416b73a4847b59b9f969a changed the variable used from context to seuser but forgot this change resulting in build errors detected by buildroot autobuilders: http://autobuild.buildroot.net/results/b89/b89b7d0f0601bb706e76cea31cf4e43326e5540c//build-end.log libbb/update_passwd.c:51:11: error: 'context' undeclared (first use in this function); did you mean 'ucontext'? freecon(context); Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | winansi: tweak colour mappingRon Yorston2021-02-041-19/+9
| |
* | printf: better support for escape sequencesRon Yorston2021-02-031-48/+60
| | | | | | | | | | | | | | | | | | | | | | | | Upstream printf outputs one character at a time which doesn't play well with emulation of ANSI escape sequences. Previous workarounds for this only applied in limited circumstances. Try a different approach: replace putchar() and printf() calls in the printf applet with custom routines which store the output in memory. It's only really output at the end of the program or when a newline is detected and a non-trivial amount has been collected.
* | winansi: extend ANSI emulationRon Yorston2021-02-031-49/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend ANSI emulation to include: ESC[38;2;R;G;Bm 24-bit foreground colour ESC[48;2;R;G;Bm 24-bit background colour ESC[38;5;Nm 8-bit foreground colour ESC[48;5;Nm 8-bit background colour The colours are selected from the 16 standard console colours. This is unlikely to be aesthetically pleasing but at least it's better than raw escape sequences. Also, add ESC[9m (strike through) as a known but unsupported sequence.
* | winansi: change default 'skip ANSI emulation' settingRon Yorston2021-02-034-15/+24
| | | | | | | | | | | | | | | | | | Change the default 'skip ANSI emulation' setting which is used when the environment variable BB_SKIP_ANSI_EMULATION is unset. Previously it was 0 (always emulate) now it's 2 (detect whether or not the terminal supports ANSI escape sequences and behave accordingly). The default value is also now a build-time option.
* | printf: code shrinkRon Yorston2021-01-271-19/+7
| | | | | | | | | | | | | | | | | | | | Instead of constructing null-terminated strings to print, output the characters between the 's' and 't' pointers using fwrite(). This avoids having to output two separate strings when an escaped literal NUL character is encountered in the format string. Saves 32 bytes.
* | stat: improve conditional compilationRon Yorston2021-01-261-5/+4
| | | | | | | | | | | | | | | | | | If FEATURE_READLINK2 isn't enabled: - in print_stat() combine the code for 'n' and 'N' format; - in do_stat() let the compiler figure out that it doesn't need to emit code to print the symbolic link.
* | tar: changes to conditional compilationRon Yorston2021-01-251-4/+6
| | | | | | | | Mostly just cosmetic.
* | ar: only free temporary filename if requiredRon Yorston2021-01-251-2/+3
| |
* | tls: avoid unnecessary changes to POSIX build, part 2Ron Yorston2021-01-258-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On reflection, the previous commit may have been ill-advised. There are many calls to open_read_close() and most shouldn't be able to access special devices. (Though in practice only a few are enabled in busybox-w32.) Nonetheless, I've implemented a new mechanism which uses the macro MINGW_SPECIAL() to mark calls to functions that are allowed to access special devices. An unrelated change is to avoid compiling fputs_stdout() in coreutils/printf.c for the POSIX build.
* | tls: avoid unnecessary changes to POSIX buildRon Yorston2021-01-242-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Calls to tls_error_die() embed the line number of the error in the binary. Since some lines had been added to tls.c for the WIN32 port a POSIX build of the busybox-w32 source differed from upstream. Avoid this by pushing the special handling of /dev/urandom down into open_read_close(). tls.c is now unchanged from upstream. The only differences in the POSIX build reported by 'objdump -s' are now the GNU build id, the copyright date and the date of the configuration.
* | nc: alter conditional compilationRon Yorston2021-01-241-7/+55
| | | | | | | | | | | | | | | | | | | | Change conditional compilation to use PLATFORM_MINGW32 instead of NC_EXTRA. Enabling NC_EXTRA won't work for busybox-w32, but then it didn't before. Also, instead of just reverting upstream commit 5b3b468ec (nc: use poll() instead of select()) include both old and new code, keyed on PLATFORM_MINGW32.
* | libbb: reduce changes to find_executable()Ron Yorston2021-01-231-8/+7
| | | | | | | | | | | | | | | | | | Reduce the divergence from upstream in find_executable(): - Reset the path separator after the call to file_is_executable(). Doing it before isn't wrong, but it's different. - Move the declaration 'char *w;' into a platform-specific block.
* | Revert "libbb: reinstate NULL check in last_char_is()"Ron Yorston2021-01-221-1/+1
| | | | | | | | | | | | | | | | This reverts commit 9828af970e6b030823beb05dae56eed44cb65fb3 which was applied as a temporary fix to an upstream issue. Upstream has since fixed the problem with commit 16e82c61d (tar: fix fallout of last_char_is(NULL) no longer being allowed).
* | libarchive: allow extraction of hard linksRon Yorston2021-01-193-14/+8
| | | | | | | | | | | | | | | | Allow create_or_remember_link() to create hardlinks. As a result tar and cpio can now extract hard links. Since unzip only supports symlinks it sees no improvement. As before, attempts to extract symlinks result in a warning.
* | ash: alter handling of interactive ^CFRP-3812-g12e14ebbaRon Yorston2021-01-181-1/+3
| | | | | | | | | | | | | | | | Upstream commit 4ac35a30d (ash: make interactive ^C break out of PS2 mode) doesn't work for WIN32. It causes the shell to exit when ^C is pressed on the command line. Call raise_interrupt() instead of raise(SIGINT).
* | Merge branch 'busybox' into mergeRon Yorston2021-01-14227-2214/+3296
|\|
| * ash: match bash behavior for ${empty_var/*/repl}Denys Vlasenko2021-01-092-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix ${unset_var/pattern/repl}Denys Vlasenko2021-01-093-1/+5
| | | | | | | | | | | | | | function old new delta subevalvar 1349 1353 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc: code shrinkDenys Vlasenko2021-01-061-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pmap: fix column width, closes 13431Denys Vlasenko2021-01-051-9/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix for the FEATURE_UTMP on the FreeBSDAlex Samorukov2021-01-041-1/+5
| | | | | | | | | | | | | | | | FreeBSD is not using <utmp.h> and does not define _PATH_UTMPX. Tested with busybox applets depending on FEATURE_UTMP (e.g. who, users, etc) Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc: ^C on input line exits (unlike ^C during calculations, which does not)Denys Vlasenko2021-01-041-10/+10
| | | | | | | | | | | | | | function old new delta xc_read_line 353 344 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix mail compilation on the FreeBSDAlex Samorukov2021-01-041-1/+14
| | | | | | | | | | | | | | FreeBSD using procctl instead of Linux prctl Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix traceroute applet on the FreeBSDAlex Samorukov2021-01-041-3/+8
| | | | | | | | | | | | | | | | | | | | | | This patch addressing 2 issues: 1. Replacing source/dest with uh_sport/uh_dport. It seems that uh_* members are defined on both Linux and BSD, so no #ifdef here 2. Use SOL_IPV6 instead of SOL_RAW on the FreeBSD to fix IPV6_CHECKSUM setsockopt Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix ping build on the FreeBSDAlex Samorukov2021-01-041-0/+38
| | | | | | | | | | | | | | | | - Define iphdr structure to build busybox/ping - Add missing includes Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix ntpd compilcation on the FreeBSDAlex Samorukov2021-01-041-0/+7
| | | | | | | | | | | | | | FreeBSD using different constant names, defining them inline Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix mknod compilation on the FreeBSDAlex Samorukov2021-01-041-1/+3
| | | | | | | | | | | | | | | | <sys/sysmacros.h> is linux-only FreeBSD defines makedev in sys/types.h already included in the libbb.h. Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix missing "crypt.h" compilation error on the FreeBSDAlex Samorukov2021-01-041-1/+3
| | | | | | | | | | | | | | FreeBSD does not use crypt.h, but unistd.h which is already included Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix klogd applet compilation on the FreeBSDAlex Samorukov2021-01-041-1/+1
| | | | | | | | | | | | | | FreeBSD also using /dev/klog, see syslogd(8) Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix httpd compilation on the FreeBSDAlex Samorukov2021-01-041-0/+5
| | | | | | | | | | | | | | FreeBSD is not exporting s6_addr32 by default, but has it. Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Fix bb_setpgrp weapper on the FreeBSDAlex Samorukov2021-01-041-1/+1
| | | | | | | | | | | | | | | | FreeBSD uses setpgrp(pid_t, pid_t) This patch makes crond.c and probably others compilable Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Do not add -lresolv on non-Linux systemsAlex Samorukov2021-01-041-0/+2
| | | | | | | | | | | | | | | | On FreeBSD getaddrinfo and friends are part of libc. Other OS-es will also have own dependencies Signed-off-by: Alex Samorukov <samm@os2.kiev.ua> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: improve --helpDenys Vlasenko2021-01-041-2/+7
| | | | | | | | | | | | | | function old new delta packed_usage 33504 33499 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: code shrinkDenys Vlasenko2021-01-041-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta hush_main 1071 1066 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5) Total: -5 bytes text data bss dec hex filename 1020110 559 5020 1025689 fa699 busybox_old 1020037 559 5020 1025616 fa650 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nuke: default to NDenys Vlasenko2021-01-031-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: code shrinkDenys Vlasenko2021-01-031-2/+2
| | | | | | | | | | | | | | function old new delta ash_main 1218 1202 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: make a strdup copy of $HISTFILE for line editingDenys Vlasenko2021-01-031-2/+2
| | | | | | | | | | | | | | | | | | Otherwise if $HISTFILE is unset or reassigned, bad things can happen. function old new delta ash_main 1210 1218 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: Add support to change default interface nameAndre Kalb2021-01-013-4/+12
| | | | | | | | | | Signed-off-by: Andre Kalb <Andre.Kalb@sma.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2021-01-011-17/+11
| | | | | | | | | | | | | | function old new delta curve25519 881 832 -49 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tar: add TODO about a bug with non-writable directories on extractDenys Vlasenko2021-01-012-0/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nslookup: do not print "No answer" for NODATA replies, closes 13006Denys Vlasenko2020-12-311-6/+22
| | | | | | | | | | | | | | | | | | Only print when there was no answer at all. function old new delta send_queries 1834 1813 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: introduce and use xgettimeofday(), do not truncate 64-bit time_t in ↵Denys Vlasenko2020-12-3016-34/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shells function old new delta xgettimeofday - 11 +11 get_local_var_value 280 281 +1 svlogd_main 1323 1322 -1 change_epoch 67 66 -1 timestamp_and_log 461 458 -3 hwclock_main 301 298 -3 fmt_time_bernstein_25 135 132 -3 step_time 331 326 -5 script_main 1207 1202 -5 machtime 34 28 -6 curtime 61 54 -7 ts_main 423 415 -8 nmeter_main 761 751 -10 gettime1900d 67 46 -21 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/12 up/down: 12/-73) Total: -61 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb/procps: smaller global data for username/groupname cacheDenys Vlasenko2020-12-301-28/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta get_cached 101 133 +32 cache_user_group - 4 +4 get_cached_username 17 14 -3 username 8 - -8 groupname 8 - -8 clear_username_cache 65 47 -18 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/2 up/down: 36/-37) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: use fopen helpers where appropriateDenys Vlasenko2020-12-303-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta finalize 348 343 -5 parse_resolvconf 306 299 -7 list_i2c_busses_and_exit 495 483 -12 bootchartd_main 1091 1076 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: fix offset for sendfileMaxim Storchak2020-12-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the Range: header is not present it the request, the offset passed to sendfile is wrong, and httpd falls back to the read-write loop. function old new delta send_file_and_exit 857 865 +8 handle_incoming_and_exit 2239 2230 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 8/-9) Total: -1 bytes Signed-off-by: Maxim Storchak <m.storchak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc,dc: make BC_LINE_LENGTH/DC_LINE_LENGTH more compatible with GNUDenys Vlasenko2020-12-297-104/+110
| | | | | | | | | | | | | | function old new delta xc_vm_init 640 682 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Start 1.34.0 development cycleDenys Vlasenko2020-12-291-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bump version to 1.33.01_33_0Denys Vlasenko2020-12-291-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>