aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* winansi: add a routine to clear the screen bufferansiRon Yorston2016-04-264-1/+25
| | | | | And use it to restore the old behaviour of vi and less: they reset the cursor to the top of the buffer and clear it.
* libbb/lineedit: scroll to cursor position on any keypressRon Yorston2016-04-263-18/+13
| | | | | Also improve erase_till_end_of_screen. Based on suggestions from GitHub user avih.
* winansi: fix a couple of small problemsRon Yorston2016-04-252-1/+5
| | | | | Clear the last line; move to cursor position before clearing screen with ^L.
* winansi: interpret absolute cursor positions relative to screenRon Yorston2016-04-251-3/+5
| | | | | | | | | Cursor positions in ANSI emulation were being treated as relative to the start of the buffer. This resulted in the contents of the buffer being lost when the screen was cleared. Treat absolute cursor postions as screen-relative. You still lose the part of the buffer that was on-screen.
* 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>
| * Revert "lxdialog: fix ncursesw include detection"Mike Frysinger2016-04-031-5/+1
| | | | | | | | | | | | | | | | | | This reverts commit e91bc53d0c2e8de7dc4fbdb888ab0a4923c2b475. Let's get back to a state that matches upstream so we can pull in all of their fixes from the last few years. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * find_applet_by_name: loop index should be signedRon Yorston2016-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | The loop for (j = ARRAY_SIZE(applet_nameofs)-1; j >= 0; j--) { was intended to terminate when j goes negative, so j needs to be signed. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * whitespace and namespace cleanupsDenys Vlasenko2016-04-034-8/+8
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubirmvol: Implement -N switch for ubirmvolSven Eisenberg2016-04-034-31/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta get_volid_by_name - 125 +125 ubi_devnum_from_devname - 43 +43 ubi_tools_main 1215 1220 +5 packed_usage 30674 30655 -19 ubirename_main 394 221 -173 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 1/2 up/down: 173/-192) Total: -19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubirename: new appletSven Eisenberg2016-04-031-0/+111
| | | | | | | | | | | | | | | | | | | | function old new delta ubirename_main - 394 +394 packed_usage 30611 30674 +63 applet_names 2530 2540 +10 Signed-off-by: Sven Eisenberg <sven.eisenberg@novero.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: speed up error_msg functionsDenys Vlasenko2016-04-031-4/+25
| | | | | | | | | | | | | | function old new delta bb_verror_msg 386 466 +80 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * main(): add a TODO about finding a use for _end[] areaDenys Vlasenko2016-04-031-0/+13
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * trylink: on failure, print a hint about CONFIG_EXTRA_LDLIBSDenys Vlasenko2016-04-031-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixDenys Vlasenko2016-04-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * find_applet_by_name: add an example of faster linear search codeDenys Vlasenko2016-04-021-3/+77
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nsenter,unshare: work around older headerDenys Vlasenko2016-04-022-0/+45
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: "-o FILE", not "-o", is the syntaxDenys Vlasenko2016-04-021-4/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nsenter,unshare: share common code; fix a bug of not closing all fdsDenys Vlasenko2016-04-025-35/+38
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xvfork_parent_waits_and_exits - 64 +64 exec_prog_or_SHELL - 39 +39 unshare_main 873 810 -63 nsenter_main 663 596 -67 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 0/2 up/down: 106/-130) Total: -27 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sort: help text does not need to say that -mST are supported but ignoredDenys Vlasenko2016-04-021-2/+5
| | | | | | | | | | | | Such information is useless for users of "sort --help" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * build system: finer-grained selection of search speedup table.Denys Vlasenko2016-04-021-32/+33
| | | | | | | | | | | | | | | | | | | | | | KNOWN_APPNAME_OFFSETS=8 versus KNOWN_APPNAME_OFFSETS=0: function old new delta find_applet_by_name 55 136 +81 applet_nameofs - 14 +14 run_applet_and_exit 757 758 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unshare: remove stale commentDenys Vlasenko2016-04-021-5/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nsenter: new appletBartosz Golaszewski2016-04-011-0/+286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta nsenter_main - 663 +663 .rodata 155147 155612 +465 packed_usage 30536 30708 +172 nsenter_longopts - 116 +116 open_by_path_or_target - 58 +58 applet_names 2518 2526 +8 applet_main 2920 2928 +8 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 4/0 up/down: 1490/0) Total: 1490 bytes text data bss dec hex filename 827956 4078 9080 841114 cd59a busybox_old 829214 4086 9080 842380 cda8c busybox_unstripped Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: two new functions: wait_for_exitstatus(pid), xfchdir(fd)Denys Vlasenko2016-04-016-15/+22
| | | | | | | | | | | | Bartosz Golaszewski proposed xfchdir() Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * unshare: new appletBartosz Golaszewski2016-04-011-0/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta unshare_main - 873 +873 .rodata 154444 155131 +687 packed_usage 30329 30520 +191 unshare_longopts - 106 +106 mount_namespaces - 99 +99 mount_or_die - 51 +51 ns_list - 48 +48 wait_for_exitstatus - 41 +41 opt_str - 17 +17 applet_names 2510 2518 +8 applet_main 2912 2920 +8 applet_suid 91 92 +1 applet_install_loc 182 183 +1 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 6/0 up/down: 2131/0) Total: 2131 bytes text data bss dec hex filename 826110 4070 9080 839260 cce5c busybox_old 827961 4078 9080 841119 cd59f busybox_unstripped Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Rename FEATURE_INITRD to LINUXRC and make it separate, not an alias to initDenys Vlasenko2016-03-3111-30/+31
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * make MKPASSWD a separate config option, not an automatic alias to cryptpwDenys Vlasenko2016-03-311-21/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: fix capitalization of two messagesDenys Vlasenko2016-03-301-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcpd: string reuseDenys Vlasenko2016-03-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: get rid of bb_info_msg()Denys Vlasenko2016-03-3016-171/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta udhcpd_main 1501 1531 +30 d6_recv_raw_packet 251 264 +13 perform_d6_release 188 198 +10 udhcpc6_main 2443 2449 +6 udhcp_recv_raw_packet 582 588 +6 udhcp_recv_kernel_packet 132 138 +6 send_d6_renew 140 146 +6 d6_recv_kernel_packet 118 124 +6 send_renew 77 82 +5 send_discover 85 90 +5 send_decline 84 89 +5 send_d6_select 97 102 +5 send_d6_discover 174 179 +5 perform_release 167 172 +5 count_lines 72 74 +2 udhcpc_main 2836 2837 +1 bb_info_msg 125 - -125 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 17/4 up/down: 117/-180) Total: -63 bytes text data bss dec hex filename 924935 906 17160 943001 e6399 busybox_old 924736 906 17160 942802 e62d2 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * setfiles: switch bb_info_msg to printfDenys Vlasenko2016-03-301-3/+4
| | | | | | | | | | | | | | | | | | Presumably, bb_info_msg was used here for syslog logging (-l), but there is no actual code to activate syslog logging. Added a TODO note on that, so that selinux users would notice and fix if needed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sulogin: use bb_error_msg instead of bb_info_msg; better messageDenys Vlasenko2016-03-301-3/+3
| | | | | | | | | | | | | | | | Historic "System Maintenance Mode" message is a tiny bit cryptic. Let's say explicitly what we are doing: we are giving user a shell (presumably to do some maintenance in single-user mode). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sulogin: remove suid paranoia code, explain why it's not necessaryDenys Vlasenko2016-03-301-13/+9
| | | | | | | | | | | | | | function old new delta sulogin_main 325 270 -55 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sulogin: Dorp incorrect comment about suid-nessDenys Vlasenko2016-03-301-1/+0
| | | | | | | | | | | | Sulogin is not a suid app, should fail if run by non-root. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fsck: use printf for message, not bb_info_msgDenys Vlasenko2016-03-301-3/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>