aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * applets: Add installation of individual binariesClayton Shotwell2015-07-012-2/+28
| | | | | | | | | | | | | | | | Adding support to install individual binaries if the option is enabled. This also installs the shared libbusybox.so.* library. Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ps: fix SEGV on narrow screens. closes 8176Denys Vlasenko2015-07-011-5/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ipaddress: better formatting, no code changesDenys Vlasenko2015-07-011-6/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip addr: support change and replace commandsMichael Tokarev2015-07-012-9/+13
| | | | | | | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix whitespacesManinder Singh2015-06-071-1/+1
| | | | | | | | | | | | | | reported by script :- scripts/fix_ws.sh Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * fix if(p)/free(p) constructManinder Singh2015-06-074-14/+7
| | | | | | | | | | | | | | | | No need of explicit NULL check before free. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: use break instead of goto in list_i2c_busses_and_exit()Bartosz Golaszewski2015-06-071-2/+1
| | | | | | | | | | | | | | | | Since there are now more statements in the if block after the while loop in list_i2c_busses_and_exit(), there's no need for a label. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: code reworkBartosz Golaszewski2015-06-071-149/+167
| | | | | | | | | | | | | | | | | | Split i2cdump_main() into shorter functions. Simplify the code a bit. Make block an array of ints so that we can store negative results of read functions (fixes a bug found by Denys Vlasenko). Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: add a check for (mode == DETECT_MODE_AUTO)Bartosz Golaszewski2015-06-071-1/+3
| | | | | | | | | | | | | | | | We should only warn the user about addresses to be skipped if (mode == DETECT_MODE_AUTO). Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: don't scan non-regular addresses without the '-a' optionBartosz Golaszewski2015-06-071-2/+4
| | | | | | | | | | | | | | | | | | Addresses 0x00-0x02 shouldn't be scanned by default. This patch makes 'first' default to 0x03 and only enables lower addresses if '-a' option is passed Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: don't die on addresses already in use by driversBartosz Golaszewski2015-06-071-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use i2c_set_slave_addr() in i2cdetect, as we have to check for EBUSY after calling ioctl(I2C_SLAVE) and print 'UU' on busy addresses instead of bailing-out. While we're at it: reorder definitions of local vars in i2cdetect_main(). function old new delta i2cdetect_main 703 744 +41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 41/0) Total: 41 bytes text data bss dec hex filename 826097 4164 9584 839845 cd0a5 busybox_old 826145 4164 9584 839893 cd0d5 busybox_unstripped Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * chown: fix help textJunling Zheng2015-06-071-1/+1
| | | | | | | | | | Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * truncate: do not die when a file doesn't exist and no-create flag is onAri Sundholm2015-05-251-5/+15
| | | | | | | | | | | | | | | | | | | | | | Additionally, open(2) failures do not make the program die immediately. This makes the behavior of the program match coreutils more closely. function old new delta truncate_main 161 221 +60 Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Print one less newline at the end of bb_show_usage()Denys Vlasenko2015-05-251-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixesManinder Singh2015-05-2517-24/+24
| | | | | | | | | | Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: fix "dc p" prinitng bogus dataDenys Vlasenko2015-05-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | function old new delta check_under - 20 +20 print_no_pop 27 32 +5 pop 33 24 -9 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 25/-9) Total: 16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tc: fix print_rateDenys Vlasenko2015-05-241-7/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | mingw: include unwind tables in 64-bit build by defaultRon Yorston2015-07-141-1/+1
| | | | | | | | | | | | Add "-funwind-tables -fasynchronous-unwind-tables" to CFLAGS for the 64-bit build, overriding the usual default. Without this change setjmp/longjmp don't work.
* | ash: store pointers to be fixed as pointers, not intRon Yorston2015-07-141-14/+16
| | | | | | | | | | | | The data block passed during forkshell includes the nodeptr array of (internal) pointers to (other internal) pointers that need to be fixed. Store the pointers as pointers, not int.
* | ipcalc: enable by default for WIN32Ron Yorston2015-07-136-15/+16
| |
* | Allow different ways to manipulate environment for XP vs 64-bitRon Yorston2015-07-035-1/+1130
| | | | | | | | | | | | | | | | | | | | | | Commit fa147bd 'Use putenv to implement unsetenv/clearenv' allowed BusyBox to run on ReactOS but broke it on Windows XP so it was reverted. It turns out that the same change is required on 64-bit Windows. Reinstate the 'safe' environment manipulation code but make it a configuration option. Add a config file for 64-bit Windows that does the right thing.
* | libbb: really add build details to bannerRon Yorston2015-06-232-5/+5
| | | | | | | | Look at the environment variable during compilation, not runtime.
* | libbb: add details of build environment to bannerRon Yorston2015-06-231-0/+6
| | | | | | | | | | If the environment variable MINGW_VERSION is set print its contents on a line after the BusyBox version string.
* | Add some more build details to README.mdRon Yorston2015-06-231-1/+1
| |
* | lineedit: skip non-executables when tab-completing commandsRon Yorston2015-06-171-0/+3
| | | | | | | | | | Directories on PATH in Windows are stuffed full of DLLs: ignore them when doing tab completion.
* | lineedit: search applets as well as PATH for tab completionRon Yorston2015-06-171-1/+14
| | | | | | | | | | | | | | | | 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.
* | busybox: update help messageRon Yorston2015-06-171-4/+9
| | | | | | | | | | Tweak text of help message in standalone shell mode. Add a warning if Windows globbing is enabled.
* | Update README.mdRon Yorston2015-06-161-1/+2
| |
* | ash: add winxp optionRon Yorston2015-06-052-6/+14
| | | | | | | | | | | | | | | | | | In some circumstances Windows XP and Windows Server 2003 seem to dislike environment variables with backslashes in paths. The 'winxp' option prevents BusyBox from changing backslashes to slashes in the environment. Although the option can be managed by the 'set' builtin it only works if '-X' is given as the first argument to the shell.
* | ash: skip PATH if executable and command are both busyboxRon Yorston2015-06-021-0/+21
| | | | | | | | | | | | If the command is 'busybox' and the executable is 'busybox.exe' don't bother checking PATH, just run the executable. This means that busybox.exe can be somewhere other than on PATH.
* | mingw: add magic '--busybox' flagRon Yorston2015-06-013-2/+7
| | | | | | | | | | | | | | | | | | If BusyBox is invoked with argv[1] set to --busybox skip the first two arguments so that argv[2] becomes the applet name and argv[3] et seq are its arguments. This is needed when BusyBox is run as sh.exe and the executable is reexecuted to invoke compress/decompress applets.
* | mingw: fixes to implementation of waitpid(2)Ron Yorston2015-05-292-3/+3
| | | | | | | | | | The third argument should be int. We only support positive pid values.
* | mingw: fix conditions under which open(2) sets errno to EISDIRRon Yorston2015-05-291-1/+1
| |
* | mingw: buffer in do_stat_internal need not be staticRon Yorston2015-05-291-1/+1
| |
* | mingw: tidy up implementation of kill(2)Ron Yorston2015-05-293-10/+16
| |
* | ash: seek to EOF when file is opened for appendRon Yorston2015-05-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shouldn't be necessary but without it the offset becomes zero when an external command is run. rm -f log echo 1234567890 >>log cmd /c echo hi >>log echo 1234567890 >>log Before this change log would contain: hi 567890 1234567890
* | Enable seamless compression for WIN32Ron Yorston2015-05-2711-12/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the archival code we pretend that WIN32 is a no-MMU platform and use the new mingw_popen_fd routine to pipe data to/from commands to compress/decompress. The pretence is maintained by redefining MMU macros in bb_archive.h. This is mostly used in the archival code but there are a handful of places where it's used to access public interfaces. The symbol BB_ARCHIVE_PUBLIC is defined in these places. With these changes: tar supports seamless compression/decompression rpm2cpio and dpkg-deb can be enabled
* | mingw: add routine to pipe a file descriptor to/from a commandRon Yorston2015-05-272-18/+129
| |
* | mingw: define a macro for spawnRon Yorston2015-05-273-5/+5
| |
* | win32: fix waitpid implementationRon Yorston2015-05-271-2/+11
| | | | | | | | _cwait requires a process handle, not a pid.
* | mingw: provide fake getgroups and getgrouplistRon Yorston2015-05-184-4/+28
| | | | | | | | | | This makes it possible to enable the id and groups applets, though the results they return are worthless.
* | mingw: implement getpwnam (but only for current user)Ron Yorston2015-05-182-1/+13
| | | | | | | | This allows the shell to expand ~user.
* | Update default configuration following mergeRon Yorston2015-05-181-1/+3
| |
* | Merge branch 'busybox' into mergeFRPRon Yorston2015-05-1880-411/+832
|\|
| * hush: add recent ash tests to hush testsuite too (they all pass for hush)Denys Vlasenko2015-05-1818-0/+29
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite: add some tests for ashRon Yorston2015-05-1810-0/+15
| | | | | | | | | | Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: fix breakage of ${v/pat/str}Ron Yorston2015-05-181-51/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit ash: move parse-time quote flag detection to run-time breaks pattern substitution in parameter expansion. Fix this and revise the code so that the different handling of the pattern and the replacement string takes place in rmescapes rather than the separate function parse_sub_pattern. function old new delta rmescapes 227 273 +46 static.qchars 3 4 +1 subevalvar 1177 1157 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 47/-20) Total: 27 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: move parse-time quote flag detection to run-timeRon Yorston2015-05-185-98/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because the parser does not recursively parse parameter expansion with respect to quotes, we can't accurately determine quote status at parse time. This patch works around this by moving the quote detection to run-time where we do interpret it recursively. Test case: foo=\\ echo "<${foo#[\\]}>" Old result: <\> New result: <> Do not quote back slashes in parameter expansions outside quotes. Test case: a=/b/c/* b=\\ echo ${a%$b*} Old result: /b/c/* New result: /b/c/ Based on commits 880d952, 7cfd8be, 0d7d660 and a7c21a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta argstr 1164 1193 +29 memtodest 147 174 +27 subevalvar 1153 1177 +24 redirect 1279 1282 +3 dolatstr 5 7 +2 static.spclchars 10 9 -1 expandarg 962 960 -2 evalcase 273 271 -2 evalcommand 1204 1197 -7 rmescapes 236 227 -9 preglob 27 8 -19 evalvar 604 582 -22 cmdputs 389 334 -55 readtoken1 3163 3061 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/9 up/down: 85/-219) Total: -134 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: remove arithmetic expansion collapsing at parse timeRon Yorston2015-05-183-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Collapsing arithmetic expansion is incorrect when the inner arithmetic expansion is a part of a parameter expansion. Test case: unset a echo $((3 + ${a:=$((4 + 5))})) echo $a Old result: 12 (4 + 5) New result: 12 9 Based on commit bb777a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta readtoken1 3180 3163 -17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: remove superfluous code in arithmetic modeRon Yorston2015-05-181-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on commits 1a74845, cfc3d6a and ff13779 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta evalcommand 1197 1204 +7 localcmd 327 325 -2 readtoken1 3200 3180 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 7/-22) Total: -15 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>