aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* kbuild: avoid warning when building with KBUILD_NO_NLSJohannes Schindelin2017-07-141-3/+3
| | | | | | | The return values of bindtextdomain() and textdomain() are not actually used at all... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* kbuild: simulate force-renaming on WindowsJohannes Schindelin2017-07-141-0/+9
| | | | | | | | | | | | | | | Calling rename() when a file with the target name exists already fails on Windows. Let's simply delete the target file, if it exists. This is usually a dangerous thing as it leaves time between deleting and renaming, during which (theoretically) another thread or process could have created the same file, and the rename() would fail again. Practically, we are talking about the kbuild system used to configure the build, where it does not matter, as we do not expect any other thread or process to interfere with the configuration files. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* kbuild: support at least non-interactive mode on WindowsJohannes Schindelin2017-07-145-3/+76
| | | | | | | | | | | | | | | | | | | without POSIX, kbuild has some trouble compiling its support executables. Luckily, the parts that really lean on POSIX functionality are pretty much all only needed when configuring the build interactively. When compiling BusyBox for Win32, we do not actually need interactive configuration at all: we simply choose the default. Therefore, a lot of the stuff that is typically built for the Kconfig system is totally unnecessary (such as: compiling documentation via fork()&exec(), changing the window size, etc). Liberally put all of the problematic code behind #ifndef __MINGW32__ guards, just to get `make mingw64_defconfig` going in Git for Windows' SDK (which is a special-purpose version of MSYS2). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* fixdep: fix assumption that `long` is as large as `void *`Johannes Schindelin2017-07-144-33/+34
| | | | | | | | | | | It is not. At least not in general. And in particular not on 64-bit Windows, where sizeof(long) == 4. What the code wanted to use is actually called intptr_t. Note: `intptr_t` is a C99 feature. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* fixdep: be careful about handling empty lines correctlyJohannes Schindelin2017-07-141-1/+4
| | | | | | | | | | | | | | | | | The current code without this patch is seriously flawed, as it can easily overrun the buffer while looking for the *beginning* of the line. The symptom when trying to build without this patch in Git for Windows' SDK (which is a special-purpose version of MSYS2) is: $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 127 make: *** [Makefile:358: scripts_basic] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* fixdep: read the dependency files in binary modeJohannes Schindelin2017-07-141-2/+6
| | | | | | | | | | | | | | | | | We want to make sure that the original line endings are preserved, as fixdep hardcodes the assumption of Unix-type line endings. The symptom is this (kinda hard to understand) error when building in Git for Windows' SDK (which is a special-purpose version of MSYS2): $ make mingw64_defconfig && make -j15 HOSTCC scripts/basic/fixdep C:/git-sdk-64/mingw64/x86_64-w64-mingw32/include/ctype.h 64-w64-mingw32/include/ctype.h: Invalid argument fixdep: make[1]: *** [scripts/Makefile.host:104: scripts/basic/fixdep] Error 2 make: *** [Makefile:358: scripts_basic] Error 2 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* Revert "nc: use poll() instead of select()"Ron Yorston2017-05-291-16/+17
| | | | This reverts commit 5b3b468ec0c6e6dfe772722dbd6b2c57cef817b5.
* Update default configurationsRon Yorston2017-05-292-38/+60
|
* Merge branch 'busybox' into mergeRon Yorston2017-05-29133-2815/+3349
|\
| * ash: fix incorrect path in describe_commandYoufu Zhang2017-05-261-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ PATH=/extra/path:/usr/sbin:/usr/bin:/sbin:/bin \ > busybox sh -xc 'command -V ls; command -V ls; command -Vp ls; command -vp ls' + command -V ls ls is /bin/ls + command -V ls ls is a tracked alias for /bin/ls + command -Vp ls ls is a tracked alias for (null) + command -vp ls Segmentation fault describe_command should respect `path' argument. Looking up in the hash table may gives incorrect index in entry.u.index and finally causes incorrect output or SIGSEGV. function old new delta describe_command 386 313 -73 Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: fix support for long options when FEATURE_LS_COLOR is deselectedLaurent Bercot2017-05-261-6/+8
| | | | | | | | | | | | | | | | | | | | | | Declaration of ls_longopts and initialization of applet_long_options were incorrectly guarded with ENABLE_FEATURE_LS_COLOR; that yielded a "ls: NO_OPT: \xff" error message when long options were selected and color support was not. This patch ensures long options are initialized separately from color support. Signed-off-by: Laurent Bercot <ska-dietlibc@skarnet.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * add/remove-shell: copy /etc/shells mode to new fileDenys Vlasenko2017-05-261-11/+9
| | | | | | | | | | | | | | function old new delta add_remove_shell_main 259 300 +41 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: fix SIGCHLD interrupting read builtinDenys Vlasenko2017-05-227-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta readcmd 169 217 +48 shell_builtin_read 1087 1097 +10 localcmd 366 364 -2 builtin_read 197 193 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 58/-6) Total: 52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * sv: update to match version 2.1.2 of runitJames Byrne2017-05-151-65/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from upstream versions: 2.1.2 Sun, 10 Aug 2014 18:01:54 +0000 * sv.c: properly format status command's output on failure cases. * sv.c: support optional LSB init script actions reload and try-restart. * sv.c: fix typo that may lead to wrong output from sv when reporting status of multiple service directories. 2.1.1 Sun, 04 Oct 2009 20:28:38 +0000 * sv.c: on 'down', send runsv the 'down' command properly if not yet done (e.g. when taken up with 'once'). [Remove previous workaround added to BusyBox version]. 1.9.0 Mon, 05 May 2008 22:00:13 +0000 * sv.c: service name is also relative to the current directory if it ends with a slash. 1.8.0 Fri, 21 Sep 2007 00:33:56 +0000 * sv.c: fix race on check for down if pid is 0 and state is run or finish. 1.7.1 Sat, 04 Nov 2006 19:23:29 +0000 * sv.c: properly wait for a service to be restarted on 'restart'; support checks through -v for pause, cont, kill. function old new delta sv 1184 1280 +96 control 132 180 +48 status 118 139 +21 out 64 85 +21 svstatus_print 334 344 +10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 196/0) Total: 196 bytes Signed-off-by: James Byrne <james.byrne at origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * runsv: update to match version 2.1.2 of runitDenys Vlasenko2017-05-151-37/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from upstream versions: 2.1.0 Thu, 24 Sep 2009 22:49:33 +0000 * runsv.c: exit with error if [log/]supervise/control exists, but is not a fifo. [Code abstracted into a separate function to make it more compact for BusyBox.] 1.9.0 Mon, 05 May 2008 22:00:13 +0000 * runsv.c: create temporary new status files for log/supervise/ actually in log/supervise/. 1.7.2 Tue, 21 Nov 2006 15:13:47 +0000 * runsv.c: really don't act on commands in state finish; minor. function old new delta open_control - 135 +135 update_status 553 612 +59 custom 223 242 +19 ctrl 426 422 -4 warn_cannot 21 10 -11 runsv_main 1786 1662 -124 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/3 up/down: 213/-139) Total: 74 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * svlogd.c: support -ttt (dateTtime instead of date_time)Denys Vlasenko2017-05-151-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport from upstream version: 1.7.0 Sat, 07 Oct 2006 18:24:17 +0000 * svlogd.c: new option -ttt: prefix log messages with sortable UTC timestamp YYYY-MM-DDTHH:MM:SS.xxxxx. function old new delta svlogd_main 1429 1454 +25 packed_usage 31575 31580 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: do not accept --background on NOMMU (same as -b)Denys Vlasenko2017-05-082-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: fix "udhcpc -x hostname:<name> not working on nommu"Denys Vlasenko2017-05-082-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * diff: fix -N and nonexistent files. Closes 7454Denys Vlasenko2017-05-051-5/+21
| | | | | | | | | | | | | | | | | | | | | | function old new delta diffreg 1253 1310 +57 diff_main 1329 1355 +26 create_J 1819 1821 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 85/0) Total: 85 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vi: survive if stdin is nonblocking. closes 9851Denys Vlasenko2017-05-021-1/+8
| | | | | | | | | | | | | | function old new delta readit 55 69 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * time: inplement -f FMTDenys Vlasenko2017-04-281-2/+5
| | | | | | | | | | | | | | | | function old new delta time_main 1076 1134 +58 packed_usage 31577 31572 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * time: implement -a, -o FILETommi Rantala2017-04-281-10/+31
| | | | | | | | | | | | | | | | | | function old new delta time_main 1052 1076 +24 packed_usage 31571 31577 +6 Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * time: document -p in usageTommi Rantala2017-04-281-1/+2
| | | | | | | | | | Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lsscsi: new appletMarkus Gothe2017-04-181-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta lsscsi_main - 326 +326 applet_names 2613 2620 +7 applet_main 1512 1516 +4 applet_install_loc 189 190 +1 packed_usage 31566 31560 -6 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/1 up/down: 338/-6) Total: 332 bytes Signed-off-by: Markus Gothe <nietzsche@lysator.liu.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Spelling fixes in comments, documentation, tests and examplesDenys Vlasenko2017-04-1741-80/+80
| | | | | | | | | | | | By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: fix stray semicolonDenys Vlasenko2017-04-171-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: support "no-argvs" usageDenys Vlasenko2017-04-141-17/+39
| | | | | | | | | | | | | | | | | | | | | | function old new delta factorize_numstr - 72 +72 packed_usage 31562 31566 +4 factor_main 109 101 -8 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 76/-8) Total: 68 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: fix "error: redefinition of 'is_tty_secure'"Denys Vlasenko2017-04-131-0/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: improve comments for sieving logic... also fix a typoDenys Vlasenko2017-04-131-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix "loginutils/Config.in:319 error: Overlong line"Denys Vlasenko2017-04-131-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: improve comments for sieving logicDenys Vlasenko2017-04-131-2/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make check_password() also return CHECKPASS_PW_HAS_EMPTY_PASSWORDDenys Vlasenko2017-04-135-8/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * su: FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTYDenys Vlasenko2017-04-133-7/+25
| | | | | | | | | | | | | | | | | | | | | | When this feature is enabled, blank passwords are not accepted by su unless the user is on a secure TTY defined in /etc/securetty. This resembles the default PAM configuration of some Linux distros which specify the nullok_secure option for pam_unix.so. Based on patch by Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * login: move check_securetty to libbbKaarle Ritvanen2017-04-134-19/+28
| | | | | | | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: tweak commentsDenys Vlasenko2017-04-131-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: implement "exec -a ARGV0 CMD ARGV1..."Denys Vlasenko2017-04-121-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta execcmd 71 112 +41 shellexec 221 224 +3 evalcommand 1158 1161 +3 localcmd 364 366 +2 unaliascmd 163 154 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/1 up/down: 49/-9) Total: 40 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: make shellexec capable of using separate argv[0] and filename to execDenys Vlasenko2017-04-121-11/+10
| | | | | | | | | | | | | | | | | | | | | | function old new delta execcmd 71 78 +7 shellexec 221 224 +3 evalcommand 1158 1161 +3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Tweak GETOPT_RESET commentDenys Vlasenko2017-04-121-5/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: GETOPT_RESET macroKaarle Ritvanen2017-04-126-52/+28
| | | | | | | | | | Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * grep: FEATURE_GREP_CONTEXT should be available for "fgrep only" tooDenys Vlasenko2017-04-121-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * catv: convert this bbox-specific applet into "cat -v"Denys Vlasenko2017-04-122-114/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta cat_main 150 320 +170 packed_usage 31511 31552 +41 applet_install_loc 190 189 -1 applet_main 1516 1512 -4 applet_names 2618 2613 -5 catv_main 227 - -227 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 2/3 up/down: 211/-237) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix errors found with make_single_applets.shDenys Vlasenko2017-04-126-35/+71
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Sort more misplaced applets into coreutils or util-linuxDenys Vlasenko2017-04-124-0/+0
| | | | | | | | | | | | | | | | No code changes Surprisingly, nice and renice are coming from different packages :) Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Sort some miscutils/ applets into coreutils or util-linuxDenys Vlasenko2017-04-1210-0/+0
| | | | | | | | | | | | No code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * partprobe: new appletDenys Vlasenko2017-04-111-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta partprobe_main - 79 +79 packed_usage 31485 31511 +26 applet_names 2608 2618 +10 applet_main 1512 1516 +4 applet_install_loc 189 190 +1 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/0 up/down: 120/0) Total: 120 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * w: new applet, alias to "who -H"Denys Vlasenko2017-04-111-4/+44
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta who_main 451 463 +12 packed_usage 31477 31485 +8 applet_main 1508 1512 +4 applet_names 2606 2608 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 26/0) Total: 26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fallocate: new appletDenys Vlasenko2017-04-112-1/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAME fallocate - preallocate or deallocate space to a file SYNOPSIS fallocate [-c|-p|-z] [-o offset] -l length [-n] filename fallocate -d [-o offset] [-l length] filename DESCRIPTION fallocate is used to manipulate the allocated disk space for a file, either to deallocate or preallocate it. For filesystems which support the fallocate system call, preallocation is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to the data blocks. This is much faster than creating a file by filling it with zeroes. function old new delta fallocate_main - 179 +179 applet_names 2597 2606 +9 applet_main 1504 1508 +4 applet_suid 94 95 +1 applet_install_loc 188 189 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fsfreeze: new appletDenys Vlasenko2017-04-111-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NAME fsfreeze - suspend access to a filesystem (Ext3/4, ReiserFS, JFS, XFS) SYNOPSIS fsfreeze --freeze|--unfreeze mountpoint DESCRIPTION fsfreeze suspends or resumes access to a filesystem. fsfreeze halts any new access to the filesystem and creates a stable image on disk. AVAILABILITY The fsfreeze command is part of the util-linux 2.28 function old new delta fsfreeze_main - 81 +81 applet_names 2597 2606 +9 applet_main 1504 1508 +4 applet_suid 94 95 +1 applet_install_loc 188 189 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * factor: remove debug codeDenys Vlasenko2017-04-111-19/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: move isqrt from factor, use it in diff tooDenys Vlasenko2017-04-114-29/+63
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>