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
Dan Fandrich
040b5a2e29
setserial: added missing \n in help text
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20 10:22:18 +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
Timo Teras
e12e0acb92
modprobe: use hash table. speeds up significantly if modprobe.dep is large
...
function old new delta
helper_get_module 106 157 +51
config_file_action 413 431 +18
modprobe_main 690 706 +16
do_modprobe 580 588 +8
add_probe 81 83 +2
load_modules_dep 192 190 -2
get_or_add_modentry 10 - -10
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/1 up/down: 95/-12) Total: 83 bytes
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-20 09:38:13 +02:00
Denys Vlasenko
416e978ce8
diff: disable debug code; remove unsupported --dry-run from help text
...
function old new delta
packed_usage 28623 28602 -21
do_line 121 91 -30
patch_main 2086 1923 -163
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-214) Total: -214 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-19 01:40:31 +02:00
Denys Vlasenko
5331e382f7
libbb/read_cmdline: prepend {comm} if different from argv0. Closes 3835.
...
function old new delta
read_cmdline 114 233 +119
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 15:51:16 +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
da94760762
fix false positive in parse test
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 09:29:21 +02:00
Denys Vlasenko
3a649363aa
parse_config: make test applet easier to enable; fix its code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-18 09:23:09 +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
Bernhard Reutner-Fischer
901a53baec
inetd: check if RPC is available
...
It would be better to have FEATURE_HAVE_RPC be user-selectable and
depend mount.nfs and inetd-rpc on it instead of the current, backward,
way.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-06-15 09:41:00 +02:00
Denys Vlasenko
8ea683d5df
ls: fix comment about -p (it's compatible now)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-13 02:24:18 +02:00
Denys Vlasenko
f194cc1f33
ls: make -v and -X actually work as intended
...
function old new delta
strverscmp - 236 +236
sortcmp 186 254 +68
static.result_type - 60 +60
static.next_state 12 16 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-13 02:13:42 +02:00
Denys Vlasenko
b307eabf4d
iplink: tweak includes to work on android
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-12 17:15:16 +02:00
Wade Berrier
000ae5cefe
pkill/pgrep: support extended regular expressions
...
Done by enabling the REG_EXTENDED and REG_NOSUB regex flags,
which also increases compatibility with the procps versions.
Signed-off-by: Wade Berrier <wade_berrier@appsig.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-10 06:01:30 +02:00
Daniel Fandrich
6295d273ad
Replaced __u32 etc. with standard uint32_t style types
...
Signed-off-by: Daniel Fandrich <dfandrich@intrinsyc.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-10 05:34:05 +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
Denys Vlasenko
d488f5e8db
build system: delete generated files on "make mrproper"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-07 10:01:58 +02:00
Denys Vlasenko
972e046070
fbset: apply modelines. Closes 3823
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-06 04:21:39 +02:00
Denys Vlasenko
d7efa06b83
fix breakage caused by 'remove "Options:" string from help texts' commit
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 15:07:31 +02:00
Denys Vlasenko
66426760be
*: remove "Options:" string from help texts
...
function old new delta
packed_usage 28706 28623 -83
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Maksym Kryzhanovskyy
9f7780250c
iostat: code shrink
...
function old new delta
iostat_main 2048 2400 +352
is_partition 48 - -48
print_stats_dev_struct 350 - -350
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:37:14 +02:00
Denys Vlasenko
5d3aaceb79
udhcpc: allow -O OPT take numeric params
...
function old new delta
udhcpc_main 2623 2654 +31
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-04 05:07:16 +02:00
Denys Vlasenko
fe86d6b636
appletlib.c: do not use PAGE_SIZE for malloc tweaking
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03 21:39:42 +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
Dan Fandrich
2f5769151f
only compile obscure.c when needed
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03 20:28:14 +02:00
Dan Fandrich
f3854f789c
replace nonstandard unsigned typedefs
...
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-03 20:25:17 +02:00
Denys Vlasenko
56a3b82e96
hush: better comment. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-01 12:47:07 +02:00
Denys Vlasenko
00ae989ee5
hush: fix a corner case of empty "do \n done" structure
...
The structure is:
while cmd; do
done
bash doesn't accept it at all. We were accepting it but execution
was buggy.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-31 17:35:45 +02:00
Bernhard Reutner-Fischer
14f55538f0
makedevs: fix help-text
...
pull
http://git.buildroot.net/buildroot/commit/?id=99ead3c2ead605d6504b9abad111778dc2a93ae6
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-30 23:00:47 +02:00
Denys Vlasenko
488dd70869
fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775
...
When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries
to include getopt.h which is not available; for example with uClibc
when !UCLIBC_HAS_GETOPT_LONG. getopt.h is only required
for the _long set of functions.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 04:24:52 +02:00
Denys Vlasenko
217a7f4bf9
fuser: fix inverted access() check. Closes 3799.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 02:03:38 +02:00
Peter Korsgaard
8dc6195c97
setconsole: open console for writing rather than reading
...
The console passed to TIOCCONS has to be writable, otherwise future
console writes will fail.
This presumably used to work, but in current kernels (see
drivers/tty/tty_io.c:redirected_tty_write) console writes are sent to
vfs_write(device), which checks if the device is writable. A quick look
in the linux git history doesn't show any recent changes to either tty_io
or vfs_write.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 01:51:33 +02:00
Denys Vlasenko
abb0952e63
nmeter: trim help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-26 09:00:23 +02:00
Denys Vlasenko
aeab42e3f4
syslogd,klogd: better help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-25 11:58:56 +02:00
Maksym Kryzhanovskyy
eeed2306fc
fuser: code shrink
...
function old new delta
scan_proc_net_or_maps - 427 +427
scan_recursive - 380 +380
search_dev_inode 74 71 -3
add_pid 39 - -39
scan_link 46 - -46
scan_dir_links 76 - -76
scan_pid_maps 222 - -222
fuser_main 871 297 -574
------------------------------------------------------------------------------
(add/remove: 2/4 grow/shrink: 0/2 up/down: 807/-960) Total: -153 bytes
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23 03:39:48 +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
b24ef035bd
find: cater for libc w/o FNM_CASEFOLD
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-23 00:40:54 +02:00
Bogdan Harjoc
7948ecb505
find: implement -ipath
...
Signed-off-by: Bogdan Harjoc <harjoc@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-22 03:50:21 +02:00
Denys Vlasenko
d616ab6bbb
reformime: do not require \r\n
...
function old new delta
parse 958 1063 +105
packed_usage 28691 28712 +21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-22 03:46:33 +02:00
Denys Vlasenko
9b90d9b503
adduser: better logic for choosing addgroup -g/--gid
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 21:32:40 +02:00
Denys Vlasenko
569e930768
adduser: prefer to call addgroup --gid, not non-std addgroup -g
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 19:57:58 +02:00
Denys Vlasenko
b808614785
od: code shrink
...
function old new delta
od_main 2147 2132 -15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 19:15:55 +02:00
Denys Vlasenko
d373355bf8
od: another fix for --strings
...
function old new delta
od_main 2139 2147 +8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 18:47:51 +02:00
Denys Vlasenko
9d96e274ce
od: fix -S NUM to not print chars >0x80
...
function old new delta
write_block 433 431 -2
print_ascii 217 215 -2
check_and_close 104 96 -8
od_main 2164 2139 -25
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 18:38:59 +02:00
Denys Vlasenko
3ef344be91
od: code shrink
...
function old new delta
exit_code - 1 +1
open_next_file 73 72 -1
limit_bytes_to_format 1 - -1
ioerror 1 - -1
flag_pseudo_start 1 - -1
flag_dump_strings 1 - -1
od_main 2275 2164 -111
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 18:38:40 +02:00
Denys Vlasenko
5c10fa5c24
od: code shrink, fix "od --traditional FILE"
...
function old new delta
parse_old_offset 107 125 +18
packed_usage 28715 28691 -24
od_main 2312 2275 -37
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-21 17:43:06 +02:00
Alexey Fomenko
232ebaa568
lineedit: fix rare SEGV; mark a few FIXMEs
...
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-20 04:26:29 +02:00
Cristian Ionescu-Idbohrn
ea137aa931
warning removal
...
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-20 03:52:36 +02:00