Denys Vlasenko
ee3bc70cea
getopt: improve help text; code shrink
...
function old new delta
generate_output 356 351 -5
packed_usage 29271 29257 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-24 11:36:00 +01:00
Denys Vlasenko
243e733001
flashcp: pad output to BUFSIZE. Hopefully closes 5882
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-23 11:41:22 +01:00
Denys Vlasenko
bf99807657
unzip: add missing fflush; code shrink
...
function old new delta
my_fgets80 - 41 +41
unzip_main 2291 2242 -49
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-22 11:16:08 +01:00
Denys Vlasenko
9b7ebfe644
mount: whitespace fix. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-22 11:00:45 +01:00
Denys Vlasenko
778794d1dd
*: reuse more strings
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-22 10:13:52 +01:00
Denys Vlasenko
6aab061d2d
ps: fix sscanf format specifier (%l); make uptime unsigned
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-22 10:07:23 +01:00
Denys Vlasenko
f474dfa681
Start 1.22.0 development cycle
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:56:21 +01:00
Denys Vlasenko
64406a92a0
Bump version to 1.21.0
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:51:23 +01:00
Denys Vlasenko
0cfba07fcd
fix testsuite false positive
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 08:28:37 +01:00
Denys Vlasenko
4609f477c7
mdev: fix mode of dir1 in =dir1/dir2/file rule
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-21 01:22:12 +01:00
Denys Vlasenko
31dc8603ee
ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask). Closes 5786
...
function old new delta
ifconfig_main 1221 1237 +16
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 18:10:12 +01:00
Denys Vlasenko
2f5b5beb28
grep: fix grep -Fw not respecting the -w option. Closes 5792
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 16:57:19 +01:00
Denys Vlasenko
81fa999540
syslogd: do not segfault on parse error when using default config. Closes 5762
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 16:05:41 +01:00
Denys Vlasenko
2cfcc9e9d7
sha3: code shrink
...
function old new delta
sha3_hash 155 101 -54
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 00:38:09 +01:00
Peter Korsgaard
9980707efc
syslogd: convert dummy functions to statics and get rid of IF_FEATURE_* checks
...
As suggested by Mike. No bloat-o-meter difference, but a bit nicer to look at.
We cannot convert the call to log_to_shmem() as it checks for G.shbuf outside
the function, and G.shbuf is only available when IPC support is enabled.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-18 19:46:47 +01:00
Denys Vlasenko
9daf33fc52
dc: code shrink
...
function old new delta
stack_machine 103 101 -2
operators 176 168 -8
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-18 13:30:13 +01:00
Denys Vlasenko
7c4b13e019
ash: revert wrong "fix" for an apparent memory leak. Closes 5822
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17 13:02:27 +01:00
Denys Vlasenko
5d78355d5a
code shrink
...
function old new delta
applet_name_compare 36 31 -5
find_applet_by_name 43 25 -18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17 11:02:43 +01:00
Denys Vlasenko
5ca853e5da
fix a typo in config help text. Closes 5714
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17 10:24:51 +01:00
Bernhard Reutner-Fischer
20c5e5a626
mount: fix -o user=foo mishandling, fix unc= generation, add prefixpath=
...
function old new delta
singlemount 1019 1049 +30
packed_usage 29252 29257 +5
parse_mount_options 230 232 +2
mount_option_str 337 338 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 38/0) Total: 38 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-17 02:30:35 +01:00
Denys Vlasenko
e4f0f26bad
sha3: s/sha3_process_block76/sha3_process_block72/
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-16 12:23:23 +01:00
Denys Vlasenko
5368fe541c
sha3: rename KeccakF->sha3_process_block76.
...
This brings the naming more in line with other hashes.
Pulled most statics and constants into it.
Also noticed that two byte arrays are 1 element too big.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-16 02:20:31 +01:00
Martin Santesson
406ea15e2c
mount: add unc option to CIFS mount (needed for Linux 3.4+)
...
unc option for CIFS mount is mandatory after CIFS option parsing
was rewritten in Linux 3.4
Signed-off-by: Martin Santesson <martinsn@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-16 00:47:19 +01:00
Denys Vlasenko
970aa6b5bd
sha3: cache ctx->bytes_queued
...
function old new delta
sha3_hash 171 155 -16
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 22:19:24 +01:00
Denys Vlasenko
8fb3ab528e
sha3: remove two "small code" codepaths: I can't reproduce code size win on them anymore
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 22:07:48 +01:00
Denys Vlasenko
8e7312e12f
sha3: tweak choice of a fast code path for 64-bit
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 21:50:41 +01:00
Denys Vlasenko
5b7f50f372
sha3: cosmetic tweaks to various names, comments. No logic changes.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 19:52:30 +01:00
Denys Vlasenko
ac4100e103
sha3: code shrink
...
function old new delta
KeccakF 1053 1078 +25
KeccakF_RoundConstants 192 48 -144
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 16:27:39 +01:00
Denys Vlasenko
a55df27936
sha3: code shrink
...
function old new delta
KeccakF 1064 1053 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 15:22:30 +01:00
Denys Vlasenko
07a54e21dd
sha3: another speedup for SHA3_SMALL=0 case
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 14:47:05 +01:00
Denys Vlasenko
6830ade6aa
whitespace fixes. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 13:58:01 +01:00
Denys Vlasenko
30a8652fbf
sha3: make size/speed optimization decision configurable
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-15 01:12:26 +01:00
Denys Vlasenko
60cb48ca50
whitespace cleanup. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 15:57:44 +01:00
Lauri Kasanen
b8173b603f
sha3sum: new applet
...
function old new delta
KeccakF - 496 +496
KeccakF_RoundConstants - 192 +192
sha3_hash - 171 +171
sha3_end - 40 +40
hash_file 274 299 +25
KeccakF_RotationConstants - 25 +25
KeccakF_PiLane - 25 +25
packed_usage 29213 29232 +19
sha3_begin - 18 +18
KeccakF_Mod5 - 10 +10
applet_names 2445 2453 +8
applet_main 1420 1424 +4
applet_nameofs 710 712 +2
------------------------------------------------------------------------------
(add/remove: 8/0 grow/shrink: 9/7 up/down: 1049/-54) Total: ~995 bytes
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 05:20:50 +01:00
Paul Marks
b7841cf7b9
ntpd: fix incorrect m_status field in outgoing packets. Closes 5120
...
When using busybox ntpd with an NTPv3 client and NTPv4 server (or vice
versa), the version numbers can be incorrectly ORed together, yielding
the bogus value of "NTPv7". This makes ntpd unusable with clients
such as Chrony and Windows "Internet Time".
This patch avoids the version mangling, by copying only the Leap
Indicator bits from the server's status field.
Signed-off-by: Paul Marks <paul@pmarks.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:39:10 +01:00
Denys Vlasenko
90801dadfa
Remove redundant 'config FEATURE_VOLUMEID_SQUASHFS'
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:24:27 +01:00
Sven-Göran Bergh
6928d9f049
volume_id: add squashfs detection
...
function old new delta
volume_id_probe_squashfs - 74 +74
fs1 12 16 +4
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:21:41 +01:00
Denys Vlasenko
6967578728
whitespace fixes. no code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 01:34:48 +01:00
Sven-Göran Bergh
5218515508
volume_id: uuid_format small code shrink
...
function old new delta
volume_id_set_uuid 318 300 -18
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:52:03 +01:00
Sven-Göran Bergh
07b419dbcb
volume_id: display hfs[+] 128-bit UUID properly
...
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:37:00 +01:00
Sven-Göran Bergh
a58f7b7d2f
blkid: add type display for hfsplus
...
Signed-off-by: Sven-Göran Bergh <sgb@systemasis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 00:35:31 +01:00
Peter Korsgaard
cd776cf967
syslogd: add option to log to Linux kernel printk buffer
...
Why invent our own shared memory circular buffer when the kernel has a
perfectly fine one already?
This can be used as a smaller/simpler alternative to the syslogd IPC support
(as IPC shmem/klogd/logread aren't needed), while also allowing centralised
logging of everything (kernel messages, userspace bootup and syslog)
when used together with ttyprintk.
Notice that kernel 3.5+ is needed to store syslog facility in printk buffer,
otherwise only the priority is stored.
bloat-o-meter compared to IPC+klogd+logread:
function old new delta
get_linux_version_code - 84 +84
lbb_prepare 25 90 +65
applet_nameofs 6 - -6
static.stdout@@GLIBC_2 8 - -8
applet_names 23 9 -14
bb_msg_standard_output 16 - -16
init_sem 18 - -18
xatoull_range 19 - -19
overlapping_strcpy 21 - -21
init_data 56 32 -24
applet_main 24 - -24
main 124 99 -25
full_write2_str 26 - -26
error_exit 26 - -26
bb_basename 30 - -30
sem_up 32 - -32
interrupted 35 - -35
fflush_stdout_and_exit 38 - -38
bb_banner 46 - -46
find_applet_by_name 59 - -59
bb_signals_recursive_norestart 90 - -90
run_applet_no_and_exit 104 - -104
timestamp_and_log 651 523 -128
syslogd_main 798 581 -217
xstrtoull_range_sfx 267 - -267
run_applet_and_exit 432 - -432
klogd_main 490 - -490
logread_main 508 - -508
.rodata 1870 937 -933
bb_common_bufsiz1 8193 - -8193
------------------------------------------------------------------------------
(add/remove: 2/26 grow/shrink: 1/6 up/down: 149/-11829) Total: -11680 bytes
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-01-06 13:30:50 -05:00
Peter Korsgaard
d189b598b4
klogd: handle multi-char log levels
...
Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length
record buffer), klog buffer can now contain log lines with multi-char
loglevel indicators (<[0-9]+>) - So use strtoul to parse it.
function old new delta
klogd_main 490 525 +35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 35/0) Total: 35 bytes
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-01-05 21:03:19 -05:00
Peter Korsgaard
3917fa32dc
dmesg: handle multi-char log levels
...
Since Linux 3.5 (7ff9554bb5: printk: convert byte-buffer to variable-length
record buffer), klog buffer can now contain log lines with multi-char
loglevel indicators (<[0-9]+>) - So we can no longer just skip 3 bytes.
Instead skip past the terminating '>' like util-linux does.
function old new delta
dmesg_main 266 280 +13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-01-05 21:02:14 -05:00
Lauri Hintsala
fb499c5752
powertop: fix error message
...
Application tries to use timer_stats module instead of cpufreq_stats.
Error message is printed if opening of the file /proc/timer_stats fails.
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-01-04 17:45:44 -05:00
Mike Frysinger
a38f9faa9f
ifenslave: fix missing close paren
...
Reported-by: David J Cozatt <ygdrasil@comcast.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-26 17:12:26 -05:00
Anthony G. Basile
12677acf0a
CONFIG_PID_FILE_PATH: new configuration option for pidfile paths
...
We set a default path for the directory where pidfiles are create
when FEATURE_PIDFILE is selected. The default has no effect on
applets which must specify a pidfile path on the command line to
run, and it can be overridden by applets which optionally allow
the user to specify the pidfile path.
We also add pidfile write/remove support for klogd, ntpd and watchdog.
For syslogd, we add a missing remove_pidfile() for better cleanup
on daemon exit.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-19 15:53:33 -05:00
Denys Vlasenko
393c395ca5
du: document incompatibility with standard tool
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-12-14 17:14:11 +01:00
Denys Vlasenko
4d5955e9ec
decompress_uncompress: comment out a bigger chunk of debug code
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-12-05 11:08:30 +01:00
Denys Vlasenko
a8461173ba
decompress_uncompress: comment out debug printout on corrupted data
...
99% plus of all people who'll get corrupted archive wouldn't bother
debugging it. The rest can uncomment the code.
function old new delta
unpack_Z_stream 1304 1234 -70
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-12-05 01:06:05 +01:00