aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * arping: avoid use of ether_ntoa(). Closes 8926Denys Vlasenko2016-05-261-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only non-debug use of ether_ntoa(). By not using it, we reduce bss: function old new delta arping_main 1568 1665 +97 static.asc 18 - -18 ether_ntoa 57 - -57 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 1/0 up/down: 97/-75) Total: 22 bytes text data bss dec hex filename 911020 493 7352 918865 e0551 busybox_old 911069 493 7336 918898 e0572 busybox_unstripped Also, "standard" arping zero-pads MAC. ether_ntoa() does not. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | libbb: set new listening sockets to dual-stack modeRon Yorston2016-07-051-0/+4
| | | | | | | | | | | | | | | | | | IPv6 sockets are created in IPv6-only mode on Microsoft Windows. The IPv6 socket option IPV6_V6ONLY needs to be turned off to permit dual-stack operation. Without this change netcat only listens on IPv6 addresses when run with no explicit IP address argument.
* | Add email address to READMERon Yorston2016-05-261-1/+1
| |
* | win32: correct cast of argument to _open_osfhandleRon Yorston2016-05-252-6/+6
| |
* | Fix for MinGW-w64Ron Yorston2016-05-251-3/+6
| | | | | | | | | | Limit the scope of '#pragma pack(2)', otherwise gunzip fails on 64-bit Windows.
* | archival: remove WIN32-specific code now lseek fails on pipesRon Yorston2016-05-242-9/+0
| |
* | win32: return an error when lseek is applied to a pipeRon Yorston2016-05-242-3/+18
| | | | | | | | | | | | | | | | | | | | | | tail failed to process input from a pipe correctly: $ echo -n 54321 | tail -c 3 543 It was trying to use lseek as an optimisation but WIN32 lseek doesn't return an error whan applied to a pipe. Fix this by providing a wrapper for lseek.
* | ash: enable wait builtin commandRon Yorston2016-05-191-4/+0
| |
* | which: explicit test for busybox when applets are preferredRon Yorston2016-05-191-1/+1
| |
* | less: hide unsupported signal handling in include fileRon Yorston2016-05-192-6/+5
| |
* | ash: use a macro to substitute waitpid_child for waitpidRon Yorston2016-05-181-4/+1
| |
* | ash: fix use of pid/handle in waitpid_childRon Yorston2016-05-183-35/+79
| | | | | | | | | | | | | | | | | | | | Previously spawn was returning a process handle which was treated as a pid in certain circumstances. This resulted in the following failing: find . -type f | sed xargs -n 1 sed -n '1 p' It should output the first line of each file but stopped after the first.
* | win32: adjustments to spawn functionsRon Yorston2016-05-183-14/+11
| | | | | | | | | | | | | | | | Make mingw_spawn_applet and mingw_spawn_1 static. The return value from spawnve is an exit code in synchronous mode and a process handle in asynchronous mode. Pass these upwards without interpretation.
* | Update default configurationRon Yorston2016-05-162-2/+4
| |
* | Merge branch 'busybox' into mergeRon Yorston2016-05-16128-295/+858
|\|
| * sed: fix append command to match GNU sed 4.2.1Denys Vlasenko2016-05-062-12/+23
| | | | | | | | | | | | This closes one testcase failure Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * flock: merge spawn_and_wait() code patchs for -c and sans-c usesDenys Vlasenko2016-04-241-12/+12
| | | | | | | | | | | | | | function old new delta flock_main 334 319 -15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * flock: fix -c; improve error handling of fork+execDenys Vlasenko2016-04-241-2/+17
| | | | | | | | | | | | | | function old new delta flock_main 254 334 +80 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip: fix problem on mips64 n64 big endian musl systemsSzabolcs Nagy2016-04-241-13/+24
| | | | | | | | | | | | | | | | | | Use designated initializers for struct msghdr. The struct layout is non-portable and musl libc does not match what busybox expects. Signed-off-by: Szabolcs Nagy <nsz@port70.net> Tested-by: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: understand \n,\r and \t in i and a commands. Closes 8871Denys Vlasenko2016-04-242-13/+43
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * generate_BUFSIZ.sh: yet another tweakDenys Vlasenko2016-04-242-13/+42
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: slap on a few ALIGN1/2s where appropriateDenys Vlasenko2016-04-2230-49/+49
| | | | | | | | | | | | | | | | | | | | The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * scripts/trylink: document DATA_SEGMENT_ALIGN() hackDenys Vlasenko2016-04-221-0/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * generate_BUFSIZ.sh: catch BUFSIZE < 1024 also on "big" buildsDenys Vlasenko2016-04-221-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: fix generate_BUFSIZ.sh to not alternate 1k and malloc buildsDenys Vlasenko2016-04-212-73/+109
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: constify *bb_common_bufsiz1 (if it is compiled to be a pointer)Denys Vlasenko2016-04-212-3/+3
| | | | | | | | | | | | | | | | | | | | This lets gcc optimize much better: text data bss dec hex filename 922846 910 13056 936812 e4b6c busybox_unstripped.nonconst 920255 910 13056 934221 e414d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make "COMMON_BUFSIZE = 1024 bytes, the buffer will be malloced" workDenys Vlasenko2016-04-212-5/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: add setup_common_bufsiz() as neededDenys Vlasenko2016-04-213-4/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko2016-04-2129-55/+83
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-2153-19/+63
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-2191-131/+414
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: shorter code for date/time generationDenys Vlasenko2016-04-181-6/+6
| | | | | | | | | | | | | | function old new delta unzip_main 2426 2414 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: better match for "standard" unzip's output; string shrinkageDenys Vlasenko2016-04-181-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta unzip_main 2490 2426 -64 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-64) Total: -64 bytes text data bss dec hex filename 924008 906 17160 942074 e5ffa busybox_old 923846 906 17160 941912 e5f58 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix percent overflow; show "stored" files properlyDenys Vlasenko2016-04-181-6/+29
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unzip: fix a case where we find wrong CDE. Closes 8821Denys Vlasenko2016-04-171-8/+35
| | | | | | | | | | | | | | function old new delta unzip_main 2472 2490 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: bash-compatible $'...' shouldn't expand in double quotesRon Yorston2016-04-155-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bash doesn't expand its $'...' construct in double quotes: $ echo "$'a\tb'" $'a\tb' Change BusyBox ash to do the same. This also fixes a problem with here documents where BusyBox ash gave an incorrect result for: $ cat <<EOF > '$' > EOF '$' Reported-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rewrite iteration through applet names to save a few bytesRon Yorston2016-04-153-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta run_applet_and_exit 758 755 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-3) Total: -3 bytes In standalone shell mode the saving increases to 17 bytes. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sed: support "-f -" idiomDenys Vlasenko2016-04-081-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | winansi: revert to previous console behaviour for vi/lessRon Yorston2016-04-264-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | Recent changes to make the Windows console behave more like a *nix terminal didn't work too well for vi/less. On *nix the terminal buffer can't be scrolled while such screen-based applications are running. In the Windows console this remained possible and led to confusion. Add a new routine to allow vi/less to revert to their previous behaviour where the cursor is positioned at the top of the buffer and the entire buffer is cleared.
* | lineedit: move console viewport to cursor on keypressRon Yorston2016-04-263-1/+7
| | | | | | | | | | | | When a normal *nix terminal has been scrolled back through its buffer, any keypress will return to the cursor position. Add code to lineedit.c to do the same for the Windows console.
* | winansi: speed up clearing of screenRon Yorston2016-04-261-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various tasks on the shell command line (e.g. backspace, DEL, reverse search) were found to be slow when the console screen buffer was very large. This was because the entire buffer was being cleared in erase_till_end_of_screen(). Rewrite erase_till_end_of_screen() to only clear to the end of the visible screen and to be tidier. (Based on a suggestion by GitHub user avih.) Also, modify move_cursor to use coordinates relative to the current display (as ANSI escapes expect) rather than relative to the screen buffer.
* | libbb/lineedit: revert last two commitsRon Yorston2016-04-261-26/+1
| | | | | | | | We had a better idea.
* | libbb/lineedit: limit cases where redraw clears to end of screenRon Yorston2016-04-241-0/+25
| | | | | | | | | | The redraw() function only needs to clear to the end of the screen for ^L. In all other cases only clear to end of line.
* | libbb/lineedit: only clear to EOL when deleting characterRon Yorston2016-04-241-2/+2
| | | | | | | | | | When the console buffer is large clearing to the end of the buffer slows deletion noticeably. Only clear to end of line.
* | ash: adjustment to 'busybox' command in standalone shell modeRon Yorston2016-04-221-19/+5
| | | | | | | | | | | | | | | | | | | | A previous change allowed the command 'busybox' (which isn't an applet) to be invoked by a direct call to the executable, avoiding a PATH lookup. For some reason I also checked that the name of the executable was 'busybox.exe'. This seems unnecessary and prevents the trick from working when the binary is called 'sh.exe', so don't do it any more.
* | mingw: enable busybox --install by defaultRon Yorston2016-04-064-5/+43
| | | | | | | | | | | | | | | | | | | | | | Allow FEATURE_INSTALLER to be configured and enable it in the default configuration. The behaviour is slightly different from upstream BusyBox: symbolic links are not permitted; if no target directory is provided the directory containing the busybox binary is used as the target.
* | ash: improve handling of invalid environment variable namesRon Yorston2016-04-051-6/+6
| | | | | | | | | | | | | | The code to replace invalid characters in environment variable names was being invoked unconditionally because the value of 'end' was altered in the loop to replace backslashes. Avoid this by using a separate loop variable.
* | mingw: post-merge build fixesRon Yorston2016-04-043-4/+15
| |
* | Merge branch 'busybox' into mergeRon Yorston2016-04-0485-641/+2897
|\|
| * unrpm: clean upMike Frysinger2016-04-041-30/+35
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>