Denys Vlasenko
d2277e262f
nommu: fix cases where we mangle argv[0][0]
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-22 17:19:26 +01:00
Denys Vlasenko
1dc80bae0b
libbb.h: add check for bad off_t size detection
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-17 21:51:32 +01:00
Denys Vlasenko
f59a50ee30
libbb.h: tighten up macro code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-16 21:30:19 +01:00
Peter Korsgaard
743edac6c8
bb_daemonize_or_rexec(): add flag to double-fork; use it in start-stop-daemon
...
Add a DAEMON_DOUBLE_FORK flag to make bb_daemonize double-fork so it isn't a
session leader, and hence doesn't get a controlling tty on Linux if a tty is
ever opened, similar to how libdaemon's daemon_fork or the big
start-stop-daemon does it - And use it in start-stop-daemon.
For details, see http://www.win.tue.nl/~aeb/linux/lk/lk-10.html#ss10.3
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-09 19:44:37 +01:00
Denys Vlasenko
9ce09bc9cb
lineedit: add support for M-b, M-f, M-d, M-Backspace
...
function old new delta
ctrl_left - 96 +96
ctrl_right - 76 +76
static.esccmds 81 93 +12
read_line_input 3876 3885 +9
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 193/0) Total: 193 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-03 13:28:22 +01:00
Leonid Lisovskiy
328f27fe44
libbb: split decode_base64 off read_base64
...
function old new delta
decode_base64 - 182 +182
read_base64 378 255 -123
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 182/-123) Total: 59 bytes
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-28 13:59:55 +02:00
Denys Vlasenko
ec447c7f01
libbb.h: remove unused defines
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-24 04:06:18 +02:00
Denys Vlasenko
1f56e51ca1
udhcpc: add support for DHCP option 212 (RFC 5969)
...
The patch is from OpenWRT people.
function old new delta
xmalloc_optname_optval 637 874 +237
dhcp_option_strings 237 243 +6
dhcp_optflags 68 70 +2
len_of_option_as_string 12 13 +1
dhcp_option_lengths 12 13 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 247/0) Total: 247 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-19 22:40:35 +02:00
Oliver Metz
cc87588a61
disable strverscmp usage if we build against uClibc-0.9.31
...
Signed-off-by: Oliver Metz <oliver.metz@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-09 02:08:42 +02:00
Denys Vlasenko
d184a728cf
rename archive.h to bb_archive.h. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-22 12:45:14 +02:00
Denys Vlasenko
16714245f9
add INIT_G()'s. No code changes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-21 01:59:15 +02:00
Denys Vlasenko
5c6ba6c56f
mdev: expand --help so that it's actually useful.
...
function old new delta
packed_usage 28634 28822 +188
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-19 12:18:11 +02:00
Denys Vlasenko
13e709c53f
losetup: implement -r option. Closes 4033.
...
function old new delta
packed_usage 28595 28633 +38
losetup_main 285 290 +5
singlemount 906 908 +2
set_loop 674 672 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-12 08:30:16 +02:00
Denys Vlasenko
dd1061b6a7
wget: URL-decode user:password before base64-encoding it into auth hdr. Closes 3625.
...
function old new delta
percent_decode_in_place - 152 +152
parse_url 304 317 +13
handle_incoming_and_exit 2795 2798 +3
httpd_main 763 760 -3
decodeString 152 - -152
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 168/-155) Total: 13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-11 21:04:02 +02:00
Denys Vlasenko
d48fdde370
stop declariong our own dirname prototype
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-10 13:48:34 +02:00
Denys Vlasenko
e0894f567a
Android build fixes and alternate (hopefully simpler) defconfig for it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-09 18:00:44 +02:00
Baruch Siach
e8f36330d9
networking: consolidate the IP checksum code. -129 bytes.
...
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-07 17:55:40 +02:00
Denys Vlasenko
e45af7ad17
lineedit: remove SAVE_HISTORY bit, ->hist_file can be used as indicator
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04 16:15:24 +02:00
Denys Vlasenko
bede215cf1
lineedit: add support for history saving on exit
...
Based on the patch by Dennis Groenen <tj.groenen@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-04 16:12:33 +02:00
Matthias Andree
1285437217
Fixes for FreeBSD build
...
Signed-off-by: Matthias Andree <mandree@freebsd.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-28 05:05:02 +02:00
Pere Orga
b1611d9a46
hostid: fix behavior on identifiers starting with zeros
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-16 23:36:10 +02:00
Denys Vlasenko
a6367f9fae
remove extra IF_WHO()
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-09 10:28:28 +02:00
Denys Vlasenko
67905e2d7c
*: work around sysinfo.h versus linux/*.h problems
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-26 13:42:12 +02:00
Denys Vlasenko
be391e7596
libbb.h: do not use homegrown struct sysinfo.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-25 11:05:43 +02:00
Denys Vlasenko
14bd16ac56
more tweak for bionic
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 08:49:40 +02:00
Denys Vlasenko
4dc35fb5b6
platform.h: tweaks for cygwin
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 04:41:38 +02:00
Dan Fandrich
75214cfe00
Use the _unlocked stdio macros only when they're all available
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-30 02:59:17 +02:00
Denys Vlasenko
0c4cf42c1e
libbb.h: tweak _unlocked hack
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-30 02:44:27 +02:00
Dan Fandrich
0e79e7bb42
Use the built-in getline on more systems that don't have it
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-30 02:11:49 +02:00
Timo Teras
0a5b310067
platform.c: provide getline implementation
...
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-29 02:19:58 +02:00
Walter Harms
b9ba580917
vi: fix regex search, make it selectable in config
...
function old new delta
char_search 134 214 +80
find_pair 187 169 -18
mycmp 37 - -37
Signed-off-by: Walter Harms <wharms@bfs.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-27 02:59:37 +02:00
Denys Vlasenko
1e18a01fa2
ls: fix HAVE_STRVERSCMP check; add check for older uclibc versions
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-21 17:12:52 +02:00
Tito Ragusa
33092f1003
groups: new applet
...
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-21 17:11:40 +02:00
Denys Vlasenko
561f9c8585
Add HAVE_STRVERSCMP, guard the only usage of strverscmp with #ifdef
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-21 16:38:29 +02:00
Denys Vlasenko
06448912e6
libbb: use _unlocked variants of stdio I/O.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20 10:06:28 +02:00
Timo Teras
adcabf3235
parse_config: use getline. BIG speedup with glibc (~40%).
...
function old new delta
config_read 559 604 +45
getline - 23 +23
config_close 29 49 +20
find_pair 169 187 +18
showmode 330 338 +8
hash_find 233 234 +1
builtin_umask 133 132 -1
lzo1x_optimize 1434 1429 -5
test_main 253 247 -6
buffer_fill_and_print 196 179 -17
create_J 1849 1826 -23
config_free_data 37 - -37
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 5/5 up/down: 138/-89) Total: 26 bytes
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20 09:49:56 +02:00
Denys Vlasenko
12ac6287ee
procps: remove PSSCAN_STAT define, users were using it incorrectly
...
Also contains small cleanups ps.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 15:49:47 +02:00
Denys Vlasenko
a1a448347e
libbb: split bb_get_chunk_from_file and bb_get_chunk_with_continuation
...
This also moves bb_get_chunk_with_continuation into its sole user,
parse_config.c.
This allows to optimize both functions separately,
they need to be optimized for speed.
(this need was highlighted by slow modprobe caused in part by slow
bb_get_chunk_with_continuation in config parser).
function old new delta
bb_get_chunk_from_file 7 130 +123
config_read 457 558 +101
bb_get_chunk_with_continuation 194 - -194
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/0 up/down: 224/-194) Total: 30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-17 03:37:43 +02:00
Dan Fandrich
f533ec8767
*: simplify Ethernet header includes
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-10 05:17:59 +02:00
Dan Fandrich
71d7313625
platform.h: support for build under Android
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03 20:51:58 +02:00
Denys Vlasenko
e6df7e261e
libbb.h: small reordering
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23 03:39:08 +02:00
Denys Vlasenko
9be4702a30
main: free suid_config list after use
...
function old new delta
run_applet_no_and_exit 438 450 +12
ifupdown_main 2147 2149 +2
writeFileToTarball 1325 1326 +1
pidof_main 244 245 +1
last_main 896 897 +1
grep_main 779 780 +1
find_list_entry2 121 122 +1
tar_main 835 833 -2
llist_unlink 28 26 -2
llist_rev 23 21 -2
main 791 782 -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/4 up/down: 19/-15) Total: 4 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-16 12:21:31 +02:00
Denys Vlasenko
12a432715f
adduser: safe username passing to passwd/addgroup
...
passwd: support creating SHA passwords
random code shrink
function old new delta
crypt_make_pw_salt - 87 +87
adduser_main 883 904 +21
...
crypt_make_salt 99 89 -10
chpasswd_main 329 312 -17
packed_usage 28731 28691 -40
passwd_main 1070 1000 -70
cryptpw_main 310 224 -86
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288) Total: -134 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 03:19:01 +02:00
Denys Vlasenko
89f5bfd6c3
libbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibc
...
text data bss dec hex filename
875879 493 7584 883956 d7cf4 busybox_old
875879 493 7584 883956 d7cf4 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 23:03:18 +02:00
Denys Vlasenko
80542bad2f
hush: make read builtin interruptible.
...
function old new delta
builtin_read 185 471 +286
check_and_run_traps 200 262 +62
nonblock_immune_read 73 119 +46
sigismember - 44 +44
record_signal - 21 +21
sigisemptyset - 16 +16
...
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46) Total: 437 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:23:43 +02:00
Denys Vlasenko
80c5b6893d
libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:21:10 +02:00
Denys Vlasenko
9180c6045e
tar: store negative mtime as 0; pack very large files using base-256 encoding
...
function old new delta
writeTarHeader 841 979 +138
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-04 21:14:12 +02:00
Denys Vlasenko
47061b4e9b
straighten out dprintf/fdprintf mess; remove old "define lchown chown"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-17 23:14:19 +02:00
Pere Orga
5bc8c005a8
move remaining help text from include/usage.src.h
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
ca18311d0a
libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-07 17:52:20 +02:00
Pere Orga
6a3e01d5a9
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03 01:33:55 +02:00
Pere Orga
34425389e0
move help text from include/usage.src.h to coreutils/*.c
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31 14:43:25 +02:00
Denys Vlasenko
2c4de5b045
ash,hush: optional support for $HISTFILESIZE.
...
Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com)
function old new delta
size_from_HISTFILESIZE - 44 +44
hush_main 998 1025 +27
ash_main 1348 1374 +26
read_line_input 3361 3372 +11
new_line_input_t 17 24 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-31 13:16:52 +02:00
Pere Orga
55068c478e
move help text from include/usage.src.h to console-tools/*.c
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-28 02:51:01 +02:00
Denys Vlasenko
6ec1510f71
applet_tables: do not include libbb.h, that header ir for target builds
...
...and applets/applet_tables.c is built on *host*.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-28 01:23:38 +02:00
Pere Orga
1f4447b2d4
move help text from include/usage.src.h to archival/*.c
...
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 22:40:30 +02:00
Roman Borisov
19311bfa7b
mount: add --rbind option support
...
Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-26 23:12:12 +01:00
Denys Vlasenko
20704f0662
ash,hush: recheck LANG before every line input
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-23 17:59:27 +01:00
Denys Vlasenko
e2e55b0eb5
wget: move help text to .c file
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-21 00:37:05 +01:00
Denys Vlasenko
681efe20d3
use user's shell instead of hardwired "/bin/sh" (android needs this)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:00:36 +01:00
Denys Vlasenko
115c35d68e
ftpd: better usage text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 03:01:10 +01:00
Bjørn Forsman
102b8bde3b
.gitignore: add missing ignores
...
Ignore output files created by "make defconfig; make".
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:54:15 +01:00
Phil Sutter
293a8f250d
nameif: add matching by phy_address=NUM; extend help text
...
function old new delta
nameif_main 618 686 +68
packed_usage 28095 28149 +54
prepend_new_eth_table 295 338 +43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 165/0) Total: 165 bytes
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:42:51 +01:00
Denys Vlasenko
b80acf58f1
tar: skip leading / and handle names like abc/..////def -> def (not ///def)
...
function old new delta
strip_unsafe_prefix - 105 +105
writeFileToTarball 557 520 -37
get_header_tar 1545 1462 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02 01:21:02 +01:00
Denys Vlasenko
5e29e26388
tar: on extract, everything up to and including last ".." is stripped
...
function old new delta
get_header_tar 1493 1545 +52
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01 17:21:07 +01:00
Denys Vlasenko
7d65abea09
libbb: make user/group name cache strings longer (~27 chars)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-01 16:27:13 +01:00
Dan Fandrich
dc50676cce
Move stpcpy replacement function into libbb
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 18:37:12 +01:00
Denys Vlasenko
4ed3c52ce9
mktemp: make it more compatible with GNU coreutils 8.4
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 17:38:34 +01:00
Denys Vlasenko
ab8d00d64f
progress meter: fix bugs found in stall detection and unknown size logic
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 19:09:30 +01:00
Denys Vlasenko
d55e139649
progress meter: move file name to bb_progress_t. +20 bytes
...
We were doing expensive unicode conversion on every update
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 18:56:13 +01:00
Denys Vlasenko
805aa9fec9
progress bar: better overflow protection; more precise bar
...
function old new delta
bb_progress_update 639 749 +110
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 14:25:51 +01:00
Denys Vlasenko
698e8095fa
use unistd.h before _POSIX_VERSION
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08 05:35:04 +01:00
Denys Vlasenko
66c5b12dbf
ash: fix TMOUT not restoring tty attributes
...
function old new delta
pgetc 420 500 +80
readtoken1 3202 3239 +37
read_line_input 3316 3337 +21
udhcpc_main 2610 2630 +20
file_get 266 272 +6
expandarg 958 963 +5
localcmd 257 259 +2
addLines 85 87 +2
read_line 94 95 +1
ed_main 2540 2541 +1
timed_out 1 - -1
lineedit_read_key 256 255 -1
alrm_sighandler 44 - -44
cmdloop 539 434 -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151) Total: 24 bytes
text data bss dec hex filename
887379 936 17200 905515 dd12b busybox_old
887411 936 17192 905539 dd143 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-08 05:07:02 +01:00
Denys Vlasenko
dd807c16f9
incorporate header fixes proposed in bug 3097
...
Not sure these are *really* needed, but I suppose they don't hurt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-07 14:58:57 +01:00
Denys Vlasenko
aef441cb4d
tar: fix a bug where autodetection messes up -z on extract
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 20:01:11 +01:00
Denys Vlasenko
046341e8bd
ash: optional support for $TMOUT variable
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-04 17:53:59 +01:00
Denys Vlasenko
6307357eff
move nofork_save_area from libbb.h to vfork_daemon_rexec.c
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 19:05:25 +01:00
Denys Vlasenko
b72baeb003
hush: use FEATURE_SH_NOFORK to enable NOFORK trick
...
Also expands docs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 18:38:57 +01:00
Denys Vlasenko
c71b469f5d
libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exe
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 03:28:56 +01:00
Denys Vlasenko
ea023eacad
disable length applet. ${#var} and echo -n "$var" | wc -c are portable equivalents
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 01:21:20 +01:00
Denys Vlasenko
8d0e0cdadf
move utmp.h include to libbb.h
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 23:21:46 +01:00
Davide Cavalca
9b3b9790b3
add ENABLE_FEATURE_SYSTEMD and use it in syslogd
...
Signed-off-by: Davide Cavalca <davide@geexbox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 02:26:03 +01:00
Denys Vlasenko
975c714183
nicer looking ifdef in libbb/makedev.c
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 23:53:12 +01:00
Chris Rees
330718ef55
FreeBSD compat
...
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 17:07:06 +01:00
Chris Rees
e3c127d846
FreeBSD compat
...
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 17:04:59 +01:00
Denys Vlasenko
e9a40e3b91
libbb: make ndelay_no/off a bit more clever. +14 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 00:29:55 +01:00
Davide Cavalca
658a437d4b
hwclock: implement --systz
...
function old new delta
hwclock_main 324 434 +110
packed_usage 28220 28259 +39
static.hwclock_longopts 53 60 +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 156/0) Total: 156 bytes
Signed-off-by: Davide Cavalca <davide@geexbox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 18:55:32 +01:00
Denys Vlasenko
1f4a987d47
pltaform.h: move include of stdint.h before uint16_t is used
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 17:31:35 +01:00
Denys Vlasenko
3a0f690dcd
svlogd: extend usage text. +70 bytes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 00:38:24 +01:00
Denys Vlasenko
b40da22357
fix compile error on non-x86 architectures
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-21 01:16:09 +01:00
Chris Rees
9ad97d5041
sighandler_t definition for BSD
...
Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 00:51:52 +01:00
Denys Vlasenko
b9f2d9f7d9
mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
3b5acaa432
disable automatic selection of FEATURE_SUID; improve its help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:52:48 +01:00
Denys Vlasenko
094cc51e50
insmod: check for module read errors
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-17 14:58:27 +01:00
Tito Ragusa
ad3d72f082
move passwd, shadow, group and gshadow path definitions to libbb.h
...
...and define them only if the used libc doesn't.
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16 23:39:45 +01:00
Denys Vlasenko
068444629f
top: add keyboard commands to --help
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-13 16:07:51 +01:00
Denys Vlasenko
dc7e5c46b0
libbb unicode: comment out usused function and unused parameter
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 13:08:28 +01:00
Denys Vlasenko
7b305646e1
stop giving root rights to dnsd, ipcrm, ipcs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-09 21:54:50 +01:00
Denys Vlasenko
bcdb9b8762
getty: fix -i (was ignored)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-09 21:44:51 +01:00
Denys Vlasenko
6100b51ca8
explain every non-SUID_DROP applet. No code changes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-03 13:57:49 +01:00
Denys Vlasenko
a9e25ffa67
su: document -l in --help text. Closes bug 2761
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 02:52:35 +01:00
Denys Vlasenko
90615a0c5c
blkid: optional support for TYPE="fstype"
...
Adapted from patch created by T4ndeta <t4ndeta@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-30 00:40:11 +01:00
Denys Vlasenko
1f937d6468
cpio: allow cpio -i to take params - names of files to extract
...
Also, improve help text
function old new delta
packed_usage 28028 28035 +7
cpio_main 542 532 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-10) Total: -3 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-26 02:22:51 +01:00
Denys Vlasenko
5707b52fd4
mailutils/*: add verbose option to sendmail; remove -m and -j from makemime
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 05:12:39 +01:00
Denys Vlasenko
2f7d9e8903
ls: print a space after each column. Closes bug 2941
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-19 07:06:44 +01:00
Denys Vlasenko
a6041860f8
nmeter: deprecate %NNNd specified, use -d MSEC instead
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-13 15:17:22 +01:00
Joachim Nilsson
dc160039ad
build system: fix "make install" to skip /usr when configured so
...
Fix regression in BusyBox 1.18.0 where the NO_USR config option no longer
bites for "make install". The busybox.mkll script stumbles without these
lines and as a result *always* creates /usr/ symlinks.
Signed-off-by: Joachim Nilsson <troglobit@vmlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05 23:05:38 +01:00
Lauri Kasanen
6578f2cf5b
pstree: new applet. +1664 bytes
...
text data bss dec hex filename
883379 936 17192 901507 dc183 busybox_old
885043 936 17192 903171 dc803 busybox_unstripped
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-05 05:22:29 +01:00
Denys Vlasenko
3f2477e8a8
touch: fix help text to not show options disabled in .config
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-01 13:06:03 +01:00
Joachim Nilsson
714e2b7e6a
ping: add -t TTL option
...
function old new delta
common_ping_main 1755 1796 +41
packed_usage 27954 27971 +17
bbconfig_config_bz2 4965 4966 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 59/0) Total: 59 bytes
Signed-off-by: Joachim Nilsson <joachim.nilsson@vmlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28 23:01:18 +01:00
Denys Vlasenko
7c6ed78aaa
patch: remove out-of-file build machinery
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22 03:15:21 +01:00
Denys Vlasenko
833d4e7f84
rename archival/libunarchive -> archival/libarchive; move bz/ into it
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
5e9934028a
*: move lzo compressor code to archival/libunarchive/. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:27:49 +01:00
Denys Vlasenko
db5fe62b6d
init: if PID!=1, show clearer error message. move usage text closer to main()
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-02 20:13:03 +01:00
Denys Vlasenko
1014a9adbf
decompress_bunzip2: relieve register pressure in hot function read_bunzip
...
function old new delta
unpack_bz2_stream 318 329 +11
read_bunzip 268 262 -6
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 19:01:58 +02:00
Denys Vlasenko
fb132e4737
whitespace cleanup
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
caddfc8339
decompress_bunzip2: handle concatenated .bz2 files
...
function old new delta
unpack_bz2_stream 207 307 +100
start_bunzip 199 209 +10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 110/0) Total: 110 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 23:08:53 +02:00
Denys Vlasenko
e4dcba1c10
*: whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
9ce642f974
libbb: introduce and use common crc32 routine
...
function old new delta
crc32_block_endian1 - 37 +37
crc32_block_endian0 - 34 +34
global_crc32_table - 8 +8
file_read 82 87 +5
gzip_main 211 214 +3
xz_crc32 40 35 -5
crc32_table 8 - -8
calculate_gunzip_crc 54 34 -20
lzo_crc32 54 25 -29
cksum_main 298 211 -87
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/4 up/down: 87/-149) Total: -62 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-27 15:26:45 +02:00
Denys Vlasenko
c386aa5dcd
Merge branch 'master' of git+ssh://busybox.net/var/lib/git/busybox
2010-10-27 11:24:40 +02:00
Bob Dunlop
55a046b4db
netstat: fix -r display in usage text
...
Signed-off-by: Bob Dunlop <bob.dunlop@xyzzy.org.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-27 02:12:29 +02:00
Denys Vlasenko
4c46d85469
mv: implement -n option
...
function old new delta
mv_longopts 23 36 +13
mv_main 510 520 +10
packed_usage 27218 27225 +7
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-26 15:58:47 +02:00
Kevin Cernekee
ccb070450e
fdisk: initial stab at GPT partition support
...
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-25 02:00:24 +02:00
Denys Vlasenko
58647e8f85
Remove check for supported libc.
...
If it is not supported, it won't work. No need to break working ones
which happen to this over this check.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:02:57 +02:00
Denys Vlasenko
1c26e05f30
remove unused SC_x (serial port names) defines
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 02:35:17 +02:00
Denys Vlasenko
5360059131
libbb: introduce and use strcpy_and_process_escape_sequences
...
function old new delta
strcpy_and_process_escape_sequences - 50 +50
bb_process_escape_sequence 148 138 -10
printf_main 789 776 -13
getty_main 1897 1831 -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23 21:06:06 +02:00
Alexander Shishkin
6722737ece
*: introduce and use xmkstemp. -65 bytes.
...
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-22 13:27:16 +02:00
Lukas Huba
08187356d7
patch: implement -E option
...
Signed-off-by: Lukas Huba <Huba.Lukas@centrum.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:43:00 +02:00
Denys Vlasenko
e7599d1cc7
revert last change (wrong author)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:42:15 +02:00
Gilles Espinasse
f0c7e0c8d5
patch: implement -E option
...
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-21 00:39:46 +02:00
Leonid Lisovskiy
894ef60032
ntpd: fix usage text and a typo in constant name
...
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-20 22:36:51 +02:00
Denys Vlasenko
9e244c7600
udhcpc: move usage text to .c file. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-20 01:38:56 +02:00
Denys Vlasenko
302ad1450e
libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256
...
function old new delta
sha256_process_block64 421 433 +12
md5_crypt 578 587 +9
md5_begin 43 50 +7
md5_hash 99 97 -2
sha1_end 85 82 -3
md5_end 36 31 -5
common64_end 93 86 -7
sha1_hash 97 - -97
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-19 02:16:12 +02:00
Denys Vlasenko
c48a5c607d
hash_md5_sha: use common finalization routine for MD5 and sha1/256. -15 bytes
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-18 14:48:30 +02:00
Denys Vlasenko
9ff50b8697
*: deinline SWAP_xE64 on 32-bit CPUs. Wins !90 bytes both on 32 and 64 bits
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-18 11:40:26 +02:00
Denys Vlasenko
b102e12253
*: use SWAP_BE64 instead of open-coding it
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-18 11:39:47 +02:00
Pascal Bellard
122a4b30f4
touch: update help text
...
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-18 00:43:07 +02:00
Denys Vlasenko
f6dacc23ff
bring md5 and sha1 names closer. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 03:21:51 +02:00
Denys Vlasenko
a971a192e8
shaN: code shrink
...
function old new delta
init512_lo 32 40 +8
init256 32 40 +8
sha256_begin 42 28 -14
sha512_begin 81 53 -28
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-42) Total: -26 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-17 01:35:16 +02:00
Denys Vlasenko
bcccad3531
md5: code shrink; and use 64-byte temp buf, not 128-byte.
...
function old new delta
md5_hash 111 108 -3
md5_end 129 125 -4
md5_hash_block 459 454 -5
filter_rename_config 250 244 -6
md5_crypt 587 578 -9
popmaildir_main 828 816 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-39) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-16 20:46:35 +02:00
Denys Vlasenko
c0683acce8
*: pass md5/shaN context pointer as 1st arg, not last
...
function old new delta
md5_hash_block 458 459 +1
filter_rename_config 252 250 -2
md5_crypt 591 587 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-16 20:45:27 +02:00
Denys Vlasenko
1a5e11c874
modutils/*: move help bits into corresponding .c files
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-16 01:56:41 +02:00
Denys Vlasenko
70186711f4
libbb/md5: code shrink
...
function old new delta
md5_end 123 117 -6
md5_begin 49 42 -7
md5_hash 119 104 -15
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-16 01:08:32 +02:00
Denys Vlasenko
c15613c975
modutils/*: move applet bits into corresponding *.c files
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-15 11:29:02 +02:00
Denys Vlasenko
f2710d0221
date: move applet and usage bits to date.c
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-15 10:42:17 +02:00
Denys Vlasenko
b1db09be5a
init/*: move applet/kbuild/config/help bits into applet source files
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-12 13:47:15 +02:00
Denys Vlasenko
d4d289acf5
tweaks to build system, mainly making menuconfig text and order clearer
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-12 04:18:05 +02:00
Denys Vlasenko
3b2acb759c
tweak help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-09 21:10:32 +02:00
Denys Vlasenko
c1e3027f11
fix help text punctuation
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-08 15:04:23 +02:00
Denys Vlasenko
6b0ac8487a
tweak usage texts
...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-07 13:25:09 +02:00