aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
| * undeb: clean upMike Frysinger2016-04-041-34/+40
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * syslogd: minor tweaks to textMike Frysinger2016-04-041-2/+2
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kconfig/lxdialog: get ncurses CFLAGS with pkg-configBjørn Forsman2016-04-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This makes "make menuconfig" also work on systems where ncurses is not installed in a standard location (such as on NixOS). This patch changes ccflags() so that it tries pkg-config first, and only if pkg-config fails does it go back to the fallback/manual checks. This is the same algorithm that ldflags() already uses. Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kbuild: Make scripts executableMichal Marek2016-04-031-0/+0
| | | | | | | | | | | | | | | | The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.hYann E. MORIN2016-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code does this: if [ -f /usr/include/ncursesw/curses.h ]; then echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"' elif [ -f /usr/include/ncurses/ncurses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"' elif [ -f /usr/include/ncurses/curses.h ]; then echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"' [...] This is merely inconsistent: - adding the full path to the directory in the -I directive, - especially since that path is already a sub-path of the system include path, - and then repeating the sub-path in the #include directive. Rationalise each include directive: - only use the filename in the #include directive, - keep the -I directives: they are always searched for before the system include path; this ensures the correct header is used. Using the -I directives and the filename-only in #include is more in line with how pkg-config behaves, eg.: $ pkg-config --cflags ncursesw -I/usr/include/ncursesw This paves the way for using pkg-config for CFLAGS, too, now we use it to find the libraries. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * menuconfig: optionally use pkg-config to detect ncurses libsJustin Lecher2016-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so. The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old heuristic for detection of the ncurses libs will be used. Signed-off-by: Justin Lecher <jlec@gentoo.org> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * menuconfig: fix extended colors ncurses supportKrzysztof Mazur2016-04-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ncurses library allows for extended colors. The support for extended colors support depends on wide-character support. ncurses headers enable extended colors (NCURSES_EXT_COLORS) only when wide-character support is enabled (NCURSES_WIDECHAR). The "make menuconfig" uses wide-character ncursesw library, which can be compiled with wide-character support, but does not define NCURSES_WIDECHAR and it's using headers without wide-character (and extended colors) support. This fixes problems with colors on systems with enabled extended colors (like PLD Linux). Without this patch "make menuconfig" is hard to use. Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kbuild: Fix gcc -x syntaxJean Delvare2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct syntax for gcc -x is "gcc -x assembler", not "gcc -xassembler". Even though the latter happens to work, the former is what is documented in the manual page and thus what gcc wrappers such as icecream do expect. This isn't a cosmetic change. The missing space prevents icecream from recognizing compilation tasks it can't handle, leading to silent kernel miscompilations. Besides me, credits go to Michael Matz and Dirk Mueller for investigating the miscompilation issue and tracking it down to this incorrect -x parameter syntax. Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: stable@vger.kernel.org Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kconfig: fix check-lxdialog for DLL platformsYaakov Selkowitz2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | Import libraries on Cygwin and MinGW/MSYS use the .dll.a suffix, so checking this suffix is necessary to make sure ncurses will still be found when built without static libraries. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kconfig: check ncursesw headers first in check-lxdialogYaakov Selkowitz2016-04-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Commit 8c41e5e363db55d91aa3b1cdce4ab02ad9821de7 added a check for ncursesw/curses.h for the case where ncurses and ncursesw are build separately but only one is installed. But if both are installed, the headers ncurses/curses.h and ncursesw/curses.h differ, and since libncursesw will be found first, so should ncursesw/curses.h. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * kconfig: fix menuconfig on debian lennyJunio C Hamano2016-04-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 60f33b8 (kconfig: get rid of stray a.o, support ncursesw, 2006-01-15), support to link menuconfig with ncursesw library was added. To compute the linker command option -l, we check "libncursesw.{so,a,dylib}" to allow ncursesw to be used as a replacement ncurses. However, when checking what header file to include, we do not check /usr/include/ncursesw directory. Add /usr/include/ncursesw to the list of directories that are checked. With this patch, on my Debian Lenny box with libncursesw5-dev package but not libncurses5-dev package, I can say "make menuconfig". Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Mike Frysinger <vapier@gentoo.org>