Commit Graph

13090 Commits

Author SHA1 Message Date
Denys Vlasenko
6782f48ccb find: support -HLP
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-14 17:20:35 +02:00
Nikolaus Voss
c3cf1e30a3 mdev: use $DEVNAME in uevent sysfs file for device node name
516530c932 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>
2013-05-13 03:55:11 +02:00
Denys Vlasenko
ff463a885d hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12 02:45:23 +02:00
Denys Vlasenko
abbc478f1c Fix build failures caused by not compiling open_transformer.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12 02:34:38 +02:00
Denys Vlasenko
f76fd17d74 telnet: code shrink
function                                             old     new   delta
telnet_main                                         1519    1515      -4
con_escape                                           296     285     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12 02:13:24 +02:00
Oliver Metz
041baf2720 volume_id: fix ntfs attribute search
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>
2013-05-09 07:45:51 +02:00
Denys Vlasenko
264f37363d vi: make regexp search case-insensitive if ":set ignorecase" is active
Reported by Dan Moinescu <dan@moinescu.net>.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-21 15:51:41 +02:00
Flemming Madsen
d96ffda62e ash,hush: history builtin
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>
2013-04-07 18:47:24 +02:00
Denys Vlasenko
3beab83e4f hush: fix for "while false && true; do echo BUG; break; done". closes 6170
function                                             old     new   delta
run_list                                             959     941     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-07 18:16:58 +02:00
Denys Vlasenko
d35cbad0ef mdev: call index_in_strings on $ACTION only after we checked it for NULL
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-02 14:37:06 +02:00
Denys Vlasenko
2df1c64f38 examples/mdev.conf.change_blockdev.sh: update
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-04-02 13:26:24 +02:00
Denys Vlasenko
e306c11367 examples: add mdev example for Android phone
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-30 16:23:12 +01:00
Denys Vlasenko
2c0508b4fa examples/inittab: fix a few incorrect statements about init
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29 14:35:44 +01:00
Denys Vlasenko
8172d054db lineedit: \W on "/bin" should show "bin", not "/bin"
function                                             old     new   delta
parse_and_put_prompt                                 793     785      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29 13:21:53 +01:00
Denys Vlasenko
1d14569a66 lineedit: implement \T \t \A \@ prompts escapes, fix \W escape, drop \!
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>
2013-03-29 13:10:23 +01:00
Denys Vlasenko
8f2cb7ab26 libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()
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>
2013-03-29 12:30:33 +01:00
Denys Vlasenko
6c852bfcad lineedit: add handling of \H in prompt
Based on the patch by Arnaud Rébillout <rebillout@syscom.ch>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-28 13:20:12 +01:00
Denys Vlasenko
2c24806bf4 hexdump: need to use xstrtoull for off_t
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27 15:18:32 +01:00
Denys Vlasenko
ef6747e290 hexdump: don't unconditionally limit the usable address range
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27 15:15:33 +01:00
Denys Vlasenko
80a38ca11c man: install to /usr/bin, not /sbin
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-27 14:30:18 +01:00
Denys Vlasenko
85daa67bc2 httpd: don't allow tabs and multiple spaces in request string
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>
2013-03-25 23:27:00 +01:00
Bernhard Reutner-Fischer
c608731e78 setserial: Fix typo: s/baund_rate/baud_rate/g
as noted by Christoph Handel opensource at macht-blau.org

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-22 17:04:51 +01:00
Denys Vlasenko
a42f530e03 sendmail: code shrink on top of previous patches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:47:16 +01:00
Aaro Koskinen
e82bfef839 sendmail: don't add multiple To: headers
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>
2013-03-18 18:46:31 +01:00
Aaro Koskinen
4a732220e9 sendmail: don't add To: header if it already exists
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>
2013-03-18 18:45:15 +01:00
Aaro Koskinen
236f222cde sendmail: support long header fields for recipients
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>
2013-03-18 18:45:15 +01:00
Aaro Koskinen
a8ba0a0d0c sendmail: support address lists
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>
2013-03-18 18:45:14 +01:00
Aaro Koskinen
06ad964ae6 sendmail: support addresses inside angle brackets
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>
2013-03-18 18:45:14 +01:00
Aaro Koskinen
95e99e5271 sendmail: don't mangle e-mail headers
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>
2013-03-18 18:45:13 +01:00
Aaro Koskinen
14285d14a5 sendmail: avoid sending mail to wrong addresses
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>
2013-03-18 18:45:13 +01:00
Denys Vlasenko
7c6f2d4207 mkfs_minix: use get_volume_size_in_bytes instead of local version
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>
2013-03-18 02:26:58 +01:00
Denys Vlasenko
4424dfd69b mdev: fix build failure
The error was "error: 'struct globals' has no member named 'parser'"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 23:01:17 +01:00
Denys Vlasenko
c56d12505b nc: fix build failure ("subscripted value is neither array nor pointer")
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 22:59:51 +01:00
Denys Vlasenko
091f831424 ash: add comment about failures in source builtin. No code changes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 14:25:22 +01:00
Denys Vlasenko
88b532d59a hush: source builtin should override $N only if it has args
function                                             old     new   delta
builtin_source                                       174     184     +10

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 14:11:04 +01:00
Stefan Hellermann
4ef1439c59 ash: read $HOME/.profile instead of $(pwd)/.profile
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>
2013-03-15 02:45:50 +01:00
Stefan Hellermann
aeb717aa5e ash: move code to allow setting $HOME in /etc/profile
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>
2013-03-15 02:37:51 +01:00
Denys Vlasenko
9e7c002182 vi: code shrink
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>
2013-03-15 02:17:29 +01:00
Ron Yorston
cb5aa725df vi: fix adjustment of buffer on partial file read
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>
2013-03-15 02:10:07 +01:00
Denys Vlasenko
257a77568a sysklogd: trim help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 01:50:35 +01:00
Guilherme Maciel Ferreira
4a600f8777 traceroute: free some memory allocated by xzalloc()
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 01:23:48 +01:00
Alexander Shiyan
45dc96c8a6 flash_eraseall: implement -N
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 00:42:39 +01:00
Alexander Shiyan
0d61dcd641 nanddump: fix build if nandwrite isn't enabled
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 00:27:41 +01:00
Denys Vlasenko
af4a07a244 ping[6]: accept and ignore -n. Code shrink
function                                             old     new   delta
print_stats_and_exit                                 270     232     -38

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 00:11:35 +01:00
Denys Vlasenko
7b5d5c1bdb udhcpd: also add -I ADDR to help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-14 02:18:52 +01:00
Denys Vlasenko
e3f5b73ad0 udhcpd: add -I LOCAL_ADDR option
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-13 22:27:37 +01:00
Bernhard Reutner-Fischer
b79a0fef99 awk: Fix handling of functions with empty body
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-13 09:47:07 +01:00
Mandeep Singh Baines
7991d45446 losetup: fix util-linux compatibility
Added -a support. Also made sure -f works as follows:

losetup [-r] [-o offset] {-f|loopdev} file

Removed support for 'losetup -r' with no arguments.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 16:31:25 -04:00
Mike Frysinger
1b49c25e0a readlink: note that our -f is really -e
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 11:38:03 -04:00
Mike Frysinger
af9e70b8cb readlink: uClibc supports automatic allocation too now
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 11:14:24 -04:00