aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* grep: fix grep -x to not set REG_NOSUBJames Hogan2013-05-162-1/+15
| | | | | | | | | | | | | | | When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses regexec's regmatch_t output to determine if the match was the entire line. However it also set the REG_NOSUB flag which makes it ignore the regmatch_t argument. Add an exception to the setting of REG_NOSUB for OPT_x and add some test cases to test the behaviour of -x. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Natanael Copa <ncopa@alpinelinux.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* volume_id_internal.h: drop unoptimized byteswap routinesDenys Vlasenko2013-05-151-36/+16
| | | | | | | function old new delta volume_id_probe_hfs_hfsplus 802 627 -175 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: don't bail out on first mismatch if '-w' option is setBartosz Golaszewski2013-05-152-8/+20
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix build failures caused by not compiling open_transformer.c (#2)Denys Vlasenko2013-05-151-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: support -HLPDenys Vlasenko2013-05-141-3/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mdev: use $DEVNAME in uevent sysfs file for device node nameNikolaus Voss2013-05-131-12/+35
| | | | | | | | | | | | | | 516530c932bd17d87c9eb4347a490be051e495f4 uses $DEVNAME variable for device node name. This is fine, but only works for hotplugging, "mdev -s" will behave differently when DEVNAME and basename(path) differ. This patch extracts the DEVNAME from the uevent sysfs file in make_device(), thus works for hot- and coldplugging; so using the environment DEVNAME on hotplug events is no longer necessary. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVEDenys Vlasenko2013-05-121-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix build failures caused by not compiling open_transformer.cDenys Vlasenko2013-05-121-12/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* telnet: code shrinkDenys Vlasenko2013-05-121-9/+8
| | | | | | | | function old new delta telnet_main 1519 1515 -4 con_escape 296 285 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* volume_id: fix ntfs attribute searchOliver Metz2013-05-091-1/+1
| | | | | | | len is declared as uint32_t but le16_to_cpu macro is used Signed-off-by: Oliver Metz <oliver.metz@gmx.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: make regexp search case-insensitive if ":set ignorecase" is activeDenys Vlasenko2013-04-211-40/+28
| | | | | | Reported by Dan Moinescu <dan@moinescu.net>. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: history builtinFlemming Madsen2013-04-074-3/+45
| | | | | | | | | | | | | | | | | | function old new delta show_history - 39 +39 builtin_history - 16 +16 historycmd - 13 +13 bltins1 312 324 +12 builtintab 336 344 +8 popstring 134 140 +6 hush_main 1048 1046 -2 ash_main 1398 1396 -2 size_from_HISTFILESIZE 44 40 -4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/3 up/down: 94/-8) Total: 86 bytes Signed-off-by: Flemming Madsen <busybox@themadsens.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix for "while false && true; do echo BUG; break; done". closes 6170Denys Vlasenko2013-04-073-10/+16
| | | | | | | function old new delta run_list 959 941 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mdev: call index_in_strings on $ACTION only after we checked it for NULLDenys Vlasenko2013-04-021-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* examples/mdev.conf.change_blockdev.sh: updateDenys Vlasenko2013-04-021-3/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* examples: add mdev example for Android phoneDenys Vlasenko2013-03-302-0/+54
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* examples/inittab: fix a few incorrect statements about initDenys Vlasenko2013-03-292-15/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: \W on "/bin" should show "bin", not "/bin"Denys Vlasenko2013-03-291-1/+1
| | | | | | | function old new delta parse_and_put_prompt 793 785 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: implement \T \t \A \@ prompts escapes, fix \W escape, drop \!Denys Vlasenko2013-03-291-37/+47
| | | | | | | | function old new delta parse_and_put_prompt 742 793 +51 read_line_input 3836 3826 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko2013-03-297-12/+35
| | | | | | | | | | | | | | | | | | function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lineedit: add handling of \H in promptDenys Vlasenko2013-03-281-5/+45
| | | | | | Based on the patch by Arnaud RĂ©billout <rebillout@syscom.ch> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hexdump: need to use xstrtoull for off_tDenys Vlasenko2013-03-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hexdump: don't unconditionally limit the usable address rangeDenys Vlasenko2013-03-272-2/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* man: install to /usr/bin, not /sbinDenys Vlasenko2013-03-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: don't allow tabs and multiple spaces in request stringDenys Vlasenko2013-03-251-2/+5
| | | | | | | | | HTTP standard doesn't allow it and no sane clients should ever use it. function old new delta handle_incoming_and_exit 2795 2785 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* setserial: Fix typo: s/baund_rate/baud_rate/gBernhard Reutner-Fischer2013-03-221-2/+2
| | | | | | as noted by Christoph Handel opensource at macht-blau.org Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* sendmail: code shrink on top of previous patchesDenys Vlasenko2013-03-181-42/+30
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: don't add multiple To: headersAaro Koskinen2013-03-181-3/+16
| | | | | | | | When adding To: header, add only a single header. If there are multiple addresses, make it multiline. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: don't add To: header if it already existsAaro Koskinen2013-03-181-2/+7
| | | | | | | If the message we are sending already has To: header, don't add a new one. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: support long header fields for recipientsAaro Koskinen2013-03-181-1/+18
| | | | | | | Support long header fields in To:, Cc: and Bcc: headers. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: support address listsAaro Koskinen2013-03-181-4/+29
| | | | | | | | Headers To:, Cc: and Bcc: may have a list of comma-separated addresses. Add support for that. Commas inside double quotes are ignored. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: support addresses inside angle bracketsAaro Koskinen2013-03-181-2/+20
| | | | | | | | When we extract addresses from the e-mail, try to first check for an address inside angle brackets. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: don't mangle e-mail headersAaro Koskinen2013-03-181-1/+3
| | | | | | | | Leave the original To: and Cc: headers untouched, when we try to extract addresses from them. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sendmail: avoid sending mail to wrong addressesAaro Koskinen2013-03-181-1/+16
| | | | | | | | | | | | | | If we get an address we cannot parse properly, we currently just strip the unknown characters and still try to send it. This is considered harmful as the resulting address may still be valid but different from what the user originally intended. Instead, skip sending to an address we cannot fully understand and print the characters what we have scanned so far. Leading and trailing whitespace is allowed and silently stripped. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkfs_minix: use get_volume_size_in_bytes instead of local versionDenys Vlasenko2013-03-181-63/+14
| | | | | | | | | | | | Hopefully this also closes 4730 function old new delta valid_offset 55 - -55 mkfs_minix_main 2925 2674 -251 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-306) Total: -306 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mdev: fix build failureDenys Vlasenko2013-03-171-2/+1
| | | | | | The error was "error: 'struct globals' has no member named 'parser'" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: fix build failure ("subscripted value is neither array nor pointer")Denys Vlasenko2013-03-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: add comment about failures in source builtin. No code changes.Denys Vlasenko2013-03-171-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: source builtin should override $N only if it has argsDenys Vlasenko2013-03-173-2/+19
| | | | | | | function old new delta builtin_source 174 184 +10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: read $HOME/.profile instead of $(pwd)/.profileStefan Hellermann2013-03-151-2/+9
| | | | | | | | | | | | ash --login should read ~/.profile instead of .profile in the current directory. I noticed it while trying to figure out why /root/.profile is only read sometimes. function old new delta ash_main 1374 1398 +24 Signed-off-by: Stefan Hellermann <stefan@the2masters.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: move code to allow setting $HOME in /etc/profileStefan Hellermann2013-03-151-13/+9
| | | | | | | | | | move HISTFILE=$HOME/.ash_history below reading /etc/profile, so that /etc/profile can set $HOME. HOME can be unset when directly invoking ash --login from init without going through getty. Signed-off-by: Stefan Hellermann <stefan@the2masters.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: code shrinkDenys Vlasenko2013-03-151-4/+10
| | | | | | | | | | | function old new delta status_line_bold_errno - 32 +32 colon 2891 2873 -18 file_insert 354 313 -41 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 32/-59) Total: -27 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: fix adjustment of buffer on partial file readRon Yorston2013-03-151-1/+1
| | | | | | | | The second argument to text_hole_delete was incorrect: it should be a pointer to the end of the hole. Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysklogd: trim help textDenys Vlasenko2013-03-151-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: free some memory allocated by xzalloc()Guilherme Maciel Ferreira2013-03-151-2/+13
| | | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* flash_eraseall: implement -NAlexander Shiyan2013-03-151-7/+8
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nanddump: fix build if nandwrite isn't enabledAlexander Shiyan2013-03-151-4/+4
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping[6]: accept and ignore -n. Code shrinkDenys Vlasenko2013-03-151-27/+34
| | | | | | | function old new delta print_stats_and_exit 270 232 -38 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: also add -I ADDR to help textDenys Vlasenko2013-03-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: add -I LOCAL_ADDR optionDenys Vlasenko2013-03-131-4/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>