Bernhard Reutner-Fischer
a060a1ad96
awk: Fix handling of functions with empty body
...
ammend b79a0fef99
to properly
handle functions defined in another scope.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-31 21:51:14 +02:00
Sven-Göran Bergh
e418b2e7bb
volume_id: nilfs config description.
...
Config description for nilfs added.
No code change.
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 18:30:34 +02:00
Sven-Göran Bergh
15d0a860e9
volume_id: Adopt to new config style.
...
Config instructions for util-linux/volume_id are moved into the
source files according to the new config feature.
No code change.
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 15:57:59 +02:00
Sven-Göran Bergh
3b45801dc6
volume_id: Adopt to new kbuild style.
...
Kbuild instructions for util-linux/volume_id are moved into the
source files according to the new build feature.
No code change.
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-31 15:45:20 +02:00
Denys Vlasenko
982e87f2fb
Whitespace fixes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30 11:52:58 +02:00
Denys Vlasenko
bfa6ed1bf4
catv: code shrink
...
catv_main 250 227 -23
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30 11:41:58 +02:00
Bartosz Golaszewski
79c618c411
Refactor catv. Move visible() from stty to libbb.
...
Fixes the following TODO:
stty's visible() function and catv's guts are identical. Merge them into
an appropriate libbb function.
Also makes catv behave exactly like coreutils' cat -v e.g. it'll print 'M-^I'
instead of 'M- '.
function old new delta
visible - 70 +70
do_display 431 379 -52
catv_main 306 250 -56
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 70/-108) Total: -38 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30 06:29:42 +02:00
Denys Vlasenko
d0bc708cb5
unpackers: by users' request, print compression percentage if -v and DESKTOP
...
function old new delta
bbunpack 634 731 +97
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30 05:41:11 +02:00
Denys Vlasenko
05965cbb75
nc: remove unnecessary "errno = 0"
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-29 14:18:32 +02:00
Denys Vlasenko
2ead5316b4
iplink: fix build error (IFLA_VLAN_PROTOCOL defined before include)
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28 23:24:55 +02:00
Denys Vlasenko
2641426187
logread: intercept all fatal signals, not just SIGINT
...
function old new delta
interrupted 27 20 -7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28 23:17:00 +02:00
Denys Vlasenko
fd3ac96c0f
nc: remove some dead code
...
function old new delta
readwrite 887 841 -46
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28 22:24:51 +02:00
Denys Vlasenko
ffeeb7a96c
nc: exit when both stdin and network are closed.
...
function old new delta
nc_main 1051 1042 -9
readwrite 943 887 -56
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28 22:23:12 +02:00
Denys Vlasenko
ca54b662e7
nc: use symbolic SHUT_WR instead of literal 1
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28 21:08:37 +02:00
Denys Vlasenko
ad546ec606
Update docs/tcp.txt
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-27 14:35:51 +02:00
Bernhard Reutner-Fischer
9078633fee
buildsys: Add helper to list suid applets
...
Add a helper script that lists all applets that
- do or may require SUID provileges (busybox.cfg.suid)
- do not require SUID provileges (busybox.cfg.nosuid)
Some setups prefer to build two busybox binaries, one that is suid which
contains all applets that do or may require suid privileges, and a
second one for all the rest (which drops suid). To ease splitting these
two binaries, generate a list of CONFIG_ items for the suid binary.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-26 13:39:46 +02:00
Denys Vlasenko
7801148a81
Add notes about TCP programming quirks.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-25 14:00:37 +02:00
Bartosz Golaszewski
688a7e3f04
date: accept 'yyyy-mm-dd HH' and 'yyyy-mm-dd' date formats
...
function old new delta
parse_datestr 794 885 +91
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-25 05:10:01 +02:00
Bartosz Golaszewski
c19be75d57
networking: code shrink
...
function old new delta
in_ether - 124 +124
hexchar2int 42 - -42
ifconfig_main 1237 1106 -131
ether_input 141 - -141
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/1 up/down: 124/-314) Total: -190 bytes
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-25 04:39:04 +02:00
Denys Vlasenko
b855460adc
awk.tests: add test for recent large integer fix
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-22 11:49:06 +02:00
Denys Vlasenko
b0e9b72915
sed: fix matching of newlines by $
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-21 22:09:44 +02:00
Denys Vlasenko
26cd90c7fd
unzip: survive lack of CDF on non-streaming zip files
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-21 02:31:08 +02:00
Denys Vlasenko
1390a010b6
awk: use "long long" as integer type, not "int"
...
Testcase:
awk "BEGIN{n=(2^31)-1; print n, int(n), n%1, ++n, int(n), n%1}"
2147483647 2147483647 0 2147483648 2147483648 0
(last three values weren't showing right)
function old new delta
evaluate 3444 3458 +14
fmt_num 221 230 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-20 21:23:01 +02:00
Denys Vlasenko
5e87e8aebb
unzip: increase PEEK_FROM_END from 16k to 64k
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-20 15:20:46 +02:00
Patrick McHardy
a7ecbed56b
ip link: add VLAN support
...
function old new delta
do_add_or_delete - 1073 +1073
get_u16 - 62 +62
static.protocols - 16 +16
do_iplink 1235 1232 -3
do_change 495 - -495
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/1 up/down: 1151/-498) Total: 653 bytes
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-15 05:16:13 +02:00
Denys Vlasenko
9b58fe9c0b
ip: code shrink
...
function old new delta
do_ipaddr 78 81 +3
do_iprule 140 139 -1
do_iptunnel 283 278 -5
iprule_modify 851 841 -10
ipaddr_modify 1293 1236 -57
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-73) Total: -70 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-15 05:15:46 +02:00
Denys Vlasenko
25ce3ee9f3
typo fix in comment
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-14 01:23:06 +02:00
Denys Vlasenko
c72b43c2f0
Commonalize typical [b,]k,m suffix struct
...
function old new delta
bkm_suffixes - 32 +32
static.km_suffixes 24 - -24
suffixes 32 - -32
static.bkm 32 - -32
head_tail_suffixes 32 - -32
------------------------------------------------------------------------------
(add/remove: 2/6 grow/shrink: 0/0 up/down: 72/-160) Total: -88 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-13 23:49:45 +02:00
Bernhard Reutner-Fischer
0dacb68e1a
chrt: remove warning for _POSIX_PRIORITY_SCHEDULING
...
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-08 11:20:13 +02:00
Denys Vlasenko
e95738f635
typo fix in comment
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08 03:13:08 +02:00
Denys Vlasenko
d87fcd4888
tail: code shrink
...
function old new delta
tail_main 1548 1613 +65
tail_read 136 34 -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 65/-102) Total: -37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08 02:39:51 +02:00
Denys Vlasenko
40ab27a225
sed: remove now-redundant backslash-newline handling
...
4b0bb9e0fd
added this code in 2007,
then in a2215b98f7
more general fix
was added.
function old new delta
add_cmd_block 98 58 -40
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08 02:07:16 +02:00
Denys Vlasenko
e93d15613e
sed: document where we are more liberal then GNU
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-08 01:43:40 +02:00
Denys Vlasenko
d8f6d8c627
Call setlocale("") , not "C", if we want to set the default one
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-07 14:41:58 +02:00
Denys Vlasenko
2301d127a2
unicode: check $LC_CTYPE too to detect Unicode mode
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-05 22:00:57 +02:00
Cristian Ionescu-Idbohrn
4f9fc1e5f5
foo*sum: Correct syntax error
...
coreutils/md5_sha1_sum.c:156:3: error: expected '}' before 'else'
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-07-04 11:33:42 +02:00
Denys Vlasenko
6651e42609
tail: track file size only in -f mode
...
This eliminates extra fstat and lseek calls on every read
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-02 20:09:15 +02:00
Denys Vlasenko
cd8eece88e
foo*sum: report I/O errors, don't merely exit with 1.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-02 19:11:01 +02:00
Denys Vlasenko
3e7ecb179b
unicode: check $LC_ALL to detect Unicode mode, not only $LANG
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-02 17:30:23 +02:00
Denys Vlasenko
ea267d518f
wget: do not abort if "_" is encountered in a HTTP header
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-01 15:05:09 +02:00
Denys Vlasenko
1bf560e9c3
cryptpw: do not segfault on EOF. Closes 6350
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 21:28:55 +02:00
Rich Felker
16614e9bab
*: change execl sentinels from NULL to (char*)0
...
Signed-off-by: Rich Felker <dalias@aerifal.cx>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 13:45:17 +02:00
Denys Vlasenko
e9b3fcc3e4
ubi_tools: enhance -s option to allow size multiplier to match mtd-utils
...
Based on patch by Paul B. Henson <henson@acm.org>
function old new delta
static.size_suffixes - 32 +32
ubi_tools_main 1141 1148 +7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 02:47:45 +02:00
Denys Vlasenko
f798ba9717
ubi_tools: add forgotten argv++
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 02:46:44 +02:00
Denys Vlasenko
65bdf0b737
ubi_tools: extend supported volume size to 64 bits; shrink code
...
function old new delta
get_num_from_file - 90 +90
packed_usage 29395 29377 -18
ubi_tools_main 1349 1141 -208
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 90/-226) Total: -136 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 02:38:18 +02:00
Paul B. Henson
f86404f773
ubimkvol: add -m option to create volume of maximum size
...
Signed-off-by: Paul B. Henson <henson@acm.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-30 02:37:05 +02:00
Denys Vlasenko
173aa78bcf
pstree: fix theoretically unsafe code
...
In practice, p->comm is never long enough to trigger the bug, but still.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28 01:59:25 +02:00
Denys Vlasenko
26a7e2ecbf
ping: code shrink
...
function old new delta
unpack_tail 262 243 -19
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28 01:33:47 +02:00
Denys Vlasenko
59f46676a9
Move create_icmp[6]_socket to its only user, and simplify it
...
function old new delta
run_applet_and_exit 711 714 +3
sendping_tail 239 236 -3
common_ping_main 1798 1770 -28
create_icmp_socket 65 - -65
create_icmp6_socket 65 - -65
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28 00:30:46 +02:00
Denys Vlasenko
4928e9f7d0
losetup: assorted fixes. Closes 6314
...
"losetup -d" was not complaining that LOOPDEV is missing.
"losetup -a" was listing only up to /dev/loop9.
"losetup -f" looped forever if llop0 was taken, and never tried
anything after /dev/loop9.
"-o" with other options (say, -r) had no effect.
function old new delta
losetup_main 376 419 +43
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27 03:45:16 +02:00