aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * swaponoff: fix compile-time warningDenys Vlasenko2015-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | CC util-linux/swaponoff.o cc1: warnings being treated as errors util-linux/swaponoff.c: In function 'swap_enable_disable': util-linux/swaponoff.c:100: warning: passing argument 1 of 'resolve_mount_spec' from incompatible pointer type make[1]: *** [util-linux/swaponoff.o] Error 1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chpasswd: support -c argument and respect DEFAULT_PASSWD_ALGOPascal Bach2015-12-182-18/+23
| | | | | | | | | | Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * include/platform.h: Remove extra #endif introduced in 6df9612.Ari Sundholm2015-12-171-1/+0
| | | | | | | | | | | | | | It causes the compilation to fail. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Resolve linker issues with Android API 21 (dprintf, tcdrain)Chris Renshaw2015-12-172-1/+8
| | | | | | | | | | Signed-off-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * blkid: add bcache supportMike Frysinger2015-12-163-0/+115
| | | | | | | | | | URL: https://bugs.gentoo.org/508596 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * swapon/swapoff: refine the -e (ifexists) optionMike Frysinger2015-12-161-8/+7
| | | | | | | | | | | | | | | | The -e option should only apply to swapon, and it should swallow all errors/warnings when the device does not exist. So delete the flag from the swapoff patch and unify the check in the swapoff path. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * trylink: include LDFLAGS when checking linkageMike Frysinger2015-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | The user might be including options in their LDFLAGS (like -fuse-ld=gold) that change the behavior of the linker and thus change the results of the flag tests. Make sure we include the user's LDFLAGS when running these tests so we filter out flags that will fail when used later on. URL: https://bugs.gentoo.org/499712 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | libbb: additional support for backslashes in pathsRon Yorston2015-11-132-1/+22
| |
* | Merge branch 'busybox' into mergeRon Yorston2015-11-0627-171/+366
|\|
| * modutils: fix build error with !DEPMODDenys Vlasenko2015-11-061-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modutils: merge module_entry and module_info to commonTimo Teräs2015-11-054-120/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merges the in-memory module info structures of modprobe and depmod. This allows sharing hashing by modulename code improving depmod runtime with almost factor of 2x. function old new delta get_or_add_modentry - 17 +17 do_modprobe 590 601 +11 moddb_get_or_create - 10 +10 load_modules_dep 195 205 +10 moddb_get - 7 +7 add_probe 81 78 -3 modprobe_main 721 714 -7 depmod_main 553 543 -10 config_file_action 434 421 -13 helper_get_module 160 144 -16 parse_module 343 320 -23 order_dep_list 105 82 -23 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/7 up/down: 55/-95) Total: -40 bytes Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * TODO file: remove mpstat, iostat, powertop - we have them nowDenys Vlasenko2015-11-041-2/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add support for bash 'function' keywordRon Yorston2015-11-043-31/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where the POSIX shell allows functions to be defined as: name () compound-command [ redirections ] bash adds the alternative syntax: function name [()] compound-command [ redirections ] Implement this in ash's bash compatibility mode. Most compound commands work (for/while/until/if/case/[[]]/{}); one exception is: function f (echo "no way!") The other two variants work: f() (echo "ok") function f() (echo "also ok") function old new delta parse_command 1555 1744 +189 tokname_array 232 240 +8 .rodata 155612 155566 -46 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 197/-46) Total: 151 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush-misc/func_args1.tests: remove "UNFIXED BUG", it does not failDenys Vlasenko2015-11-042-3/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: copy function tests from hush testsuiteRon Yorston2015-11-0416-0/+119
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2c_tools: suppress "'blen' may be used uninitialized in this function"Denys Vlasenko2015-11-011-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: display the numeric value for block read ioctl() errorsBartosz Golaszewski2015-11-011-2/+4
| | | | | | | | | | | | | | | | This makes busybox i2cdump compatible with the upstream version, which also displays the numeric error value in case of a block read failure. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: bail-out if block read failsBartosz Golaszewski2015-11-011-5/+8
| | | | | | | | | | | | | | | | | | We should bail-out if i2c_smbus_read_block_data() or i2c_smbus_read_i2c_block_data() return 0 or less. Add the missing check for the former and fix the existing for the latter. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: use I2C block mode for the 'i' mode parameterBartosz Golaszewski2015-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | Currently we're calling i2c_smbus_read_block_data() for both 'i' and 's' mode parameters. If the bus doesn't support SMBus block mode, then the i2c access ioctl() fails. Make i2cdump behave compatibly with upstream version by calling i2c_smbus_read_i2c_block_data() for I2C block. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: don't read block data in non-block modesBartosz Golaszewski2015-11-011-1/+2
| | | | | | | | | | | | | | | | We currently read data twice in byte mode. Add a check to avoid calling i2c_smbus_read_i2c_block_data() if we're not in I2C or SMBus block mode. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: coding style: add a space after 'for'Bartosz Golaszewski2015-11-011-1/+1
| | | | | | | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: fix address skipping in auto modeBartosz Golaszewski2015-11-011-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | If the bus doesn't support SMBus Quick Write or Receive Byte commands and we're running in auto mode all addresses will be skipped resulting in an empty table being printed. This is caused by not restoring the auto mode after it's been changed for certain address ranges - we need an additional variable to hold the temporary state. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: use -x hostname:NAME with udhcpcNatanael Copa2015-10-311-2/+2
| | | | | | | | | | | | | | | | The -H NAME is deprecated in udhcpc. See commit 2017d48c0d70bef8768efb42909e605ea8eb5a21 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | find: enable -perm option in default configurationRon Yorston2015-11-032-2/+2
| |
* | win32: improve implementation of statfsRon Yorston2015-11-013-14/+13
| | | | | | | | The WIN32 calls should be passed the root directory of the filesystem.
* | Update default configurationRon Yorston2015-11-013-19/+18
| |
* | Merge branch 'busybox' into mergeRon Yorston2015-10-31101-549/+1041
|\|
| * [g]unzip: fix recent breakage.Denys Vlasenko2015-10-302-12/+22
| | | | | | | | | | | | Also, do emit error message we so painstakingly pass from gzip internals Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow popredir to be called if the stack is emptyRon Yorston2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If /tmp/test.sh is a script that tries to run a second script which happens to be non-executable this: command . /tmp/test.sh causes a seg fault. This is because clearredir is called in the error path to clear the stack of redirections. The normal path then calls popredir, but popredir fails when the stack is empty. Reported-by: Bastian Bittorf <bittorf@bluebottle.com> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix EXEXEC status clobberingRon Yorston2015-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | evalcommand always clobbers the exit status in case of an EXEXEC which means that exec always fails with exit status 2 regardless of what it actually returns. This patch adds the missing check for EXEXEC so that the correct exit status is preserved. It causes the test ash-misc/exec.tests to succeed. Based on commit 7f68426 in dash git, by Herbert Xu. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add tests for failures of the exec and command builtinsRon Yorston2015-10-304-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | The exec builtin should return an exit status of 127 if the command can't be found. It doesn't: it returns 2. If the command builtin is used to source a script that runs a second script that doesn't exist ash should issue an error. Instead it seg faults. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * stat: make -f optional. This allows to build stat for non-linux systemsDenys Vlasenko2015-10-302-36/+61
| | | | | | | | | | | | | | | | | | function old new delta packed_usage 30761 30706 -55 Based on the patch by Ron Yorston. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: FEATURE_REVERSE_SEARCH should not depend on SAVEHISTORYDenys Vlasenko2015-10-301-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lineedit: search applets as well as PATH for tab completionRon Yorston2015-10-301-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In standalone shell mode search the applet table as well as PATH when tab completing a command. Use a stupid linear search: we're also about to read all the directories on PATH so efficiency isn't a big concern. function old new delta add_match - 53 +53 complete_cmd_dir_file 687 724 +37 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 90/0) Total: 90 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * busybox: alter help message in standalone shell modeRon Yorston2015-10-301-0/+9
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * hush: copy for.tests from ash testsuiteDenys Vlasenko2015-10-292-0/+6
| | | | | | | | | | | | This test passes for hush Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: simplify EOF/newline handling in list parserRon Yorston2015-10-291-34/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Processing of here documents in ash has had a couple of breakages which are now the subject of tests. This commit should fix both. It is based on the following commit in dash git by Herbert Xu: <7c245aa> [PARSER] Simplify EOF/newline handling in list parser (See git://git.kernel.org/pub/scm/utils/dash/dash.git) Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Revert "ash: fix a SEGV case in an invalid heredoc" xxxRon Yorston2015-10-291-11/+4
| | | | | | | | | | | | | | | | | | This reverts commit 7e66102f762a7d80715f0c7e5925433256b78cee but leaves the test in place as it's still valid. Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix error during recursive processing of here documentRon Yorston2015-10-293-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the value of the checkkwd flag to prevent it being clobbered during recursion. Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta readtoken 190 203 +13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash tests: make test print test name before it is runDenys Vlasenko2015-10-291-2/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: only allow local variables in functionsRon Yorston2015-10-293-0/+5
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: respect -p flag when command builtin is run with -v/-VRon Yorston2015-10-293-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command builtin should only check the default path, not $PATH, when the -p flag is used along with -v/-V. Based on commits 65ae84b (by Harald van Dijk) and 29ee27d (by Herbert Xu) from git://git.kernel.org/pub/scm/utils/dash/dash.git). function old new delta commandcmd 72 87 +15 describe_command 437 450 +13 typecmd 84 86 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 30/0) Total: 30 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix command -- crashDenys Vlasenko2015-10-291-3/+4
| | | | | | | | | | | | | | | | | | | | busybox sh -c 'command --' segfaults because parse_command_args returns a pointer to a null pointer. Based on commit 18071c7 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Gerrit Pape. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: save a few bytes in code to parse case statementsRon Yorston2015-10-291-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on commit 49b82fc from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta parse_command 1563 1555 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-8) Total: -8 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allow newline after variable name in for loopRon Yorston2015-10-293-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newline is a valid delimiter between the variable name and `in` keyword in for loops. Based on commit 22e8fb4 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta parse_command 1568 1563 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5) Total: -5 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: add test for issue with here documentRon Yorston2015-10-292-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This used to work but doesn't now: foo () { cat <<EOF && { echo "$1" ; } $1 EOF } foo "bar" Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * modinfo: fix "-F firmware", add "intree" field displayDenys Vlasenko2015-10-281-52/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta shortcuts - 52 +52 modinfo 317 330 +13 display 77 87 +10 packed_usage 30752 30761 +9 modinfo_main 351 345 -6 static.shortcuts 48 - -48 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 3/1 up/down: 84/-54) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lzop: eliminate variable, use "int" as return typeDenys Vlasenko2015-10-281-8/+6
| | | | | | | | | | | | | | | | | | Based on patch by Maxin B. John <maxin.john@intel.com> function old new delta pack_lzop 870 859 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fbsplash: use virtual y size in mmap size calculationsTimo Teräs2015-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | The virtual y can be larger - and we can be even writing there since we are taking into account the y offset. Avoids possible crash. But use it only if set, seems it is not set if virtual area is not allocated (though, often fbcon allocates some scrollback area). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * gzip: add support for --no-name long optionAaro Koskinen2015-10-272-0/+2
| | | | | | | | | | | | | | | | | | | | Add support for --no-name long option. Just silently ignore it like the short -n option. This allows to use busybox gzip with Lynx browser. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>