Commit Graph

1982 Commits

Author SHA1 Message Date
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
Richard Braun
5aa4d53273 tune2fs: implement -c and -i options
function                                             old     new   delta
tune2fs_main                                         165     256     +91

Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-05 00:39:46 +02:00
Denys Vlasenko
afc7b4c0d8 wc: add support for -m
function                                             old     new   delta
wc_main                                              601     637     +36
packed_usage                                       27357   27358      +1

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-04 17:08:14 +02:00
Dan Fandrich
2d1a78b88f Marked some more applets NOEXEC/NOFORK
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-01 23:35:09 +02:00
Denys Vlasenko
5657d374db free: document newly added options
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-01 22:42:44 +02:00
Denys Vlasenko
ee5ab8f321 halt/poweroff/reboot: unify help text
function                                             old     new   delta
packed_usage                                       27755   27733     -22

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-30 23:44:08 +02:00
Souf Oued
ccb7a43900 acpid: add config file and map file
function                                             old     new   delta
acpid_main                                           434    1137    +703
find_action                                            -     204    +204
f_evt_tab                                              -      48     +48
packed_usage                                       27724   27755     +31
f_act_tab                                              -      16     +16
process_event                                        126       -    -126
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/0 up/down: 1002/-126)         Total: 876 bytes

Signed-off-by: Souf Oued <souf_oued@yahoo.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-26 12:40:05 +02:00
Denys Vlasenko
9fe98f701d libbb: merge mail and uudecode's base64 decoders
function                                             old     new   delta
read_base64                                            -     378    +378
uudecode_main                                        306     315      +9
parse                                                953     958      +5
read_stduu                                           250     254      +4
base64_main                                          217     219      +2
read_base64                                          358       -    -358
decode_base64                                        371       -    -371
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729)         Total: -331 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-16 17:51:13 +02:00
Denys Vlasenko
197a6b3c14 sleep: make it non-NOFORK. Fixes ^C in standalone shell
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-14 12:57:05 +02:00
Denys Vlasenko
b1560000c7 tweak udhcpd help text
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 13:39:59 +02:00
Denys Vlasenko
96f064d416 shell: remove lash and bbsh
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-06 10:18:21 +02:00
Denys Vlasenko
7aa63042d0 libbb: xfunc_error_retval can be a byte
function                                             old     new   delta
xfunc_die                                             55      60      +5
log_and_exit                                          43      45      +2
hush_main                                            961     963      +2
xfunc_error_retval                                     4       1      -3
tty_main                                              87      84      -3
sv_main                                             1183    1180      -3
sort_main                                            804     801      -3
run_applet_no_and_exit                               440     437      -3
puts_maybe_newline                                   198     195      -3
nohup_main                                           228     225      -3
httpd_main                                           753     750      -3
get_header_tar                                      1496    1493      -3
fsck_minix_main                                     2972    2969      -3
expr_main                                            110     107      -3
cmp_main                                             641     638      -3
chat_main                                           1359    1356      -3
builtin_exit                                          48      45      -3
arping_main                                         1587    1584      -3
BB_EXECVP_or_die                                      47      44      -3
send_cgi_and_exit                                    901     895      -6
diff_main                                           1197    1191      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/18 up/down: 9/-60)            Total: -51 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01 16:04:24 +02:00
Denys Vlasenko
0004e99493 better shared strings trick
text	   data	    bss	    dec	    hex	filename
 861980	    441	   7540	 869961	  d4649	busybox_old
 861914	    441	   7540	 869895	  d4607	busybox_unstripped

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01 12:01:17 +02:00
Denys Vlasenko
8d3e225a2d libbb: add xfstat function
function                                             old     new   delta
xfstat                                                 -      25     +25
mkfs_ext2_main                                      2421    2423      +2
mkfs_reiser_main                                    1197    1194      -3
next                                                 312     307      -5
ar_main                                              533     522     -11
mkfs_minix_main                                     2938    2924     -14
mkfs_vfat_main                                      1511    1495     -16
writeTarFile                                         272     255     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-31 12:42:06 +02:00
Alexander Shishkin
0834a6d3b9 pmap: new applet. +1k.
pmap is a tool used to look at processes' memory maps, normally found
in procps package. It provides more readable and easily sortable output
(one line per mapping) from  maps/smaps files in /proc/PID/.  This would
help in debugging memory usage issues, especially on devices where lots
of typing is not a viable option.

This patch does'n implement -d and -A command line options of GNU pmap,
since those are not that must have features and I was afraid of going
blind from looking at its code.

The implementation takes smaps scanning part out of procps_scan() function
and moves it into procps_read_smaps(), which does more detailed processing
of a single PID's smaps data.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-28 23:20:34 +02:00
Denys Vlasenko
e7b0a9e5bc patch: support "patch [FILE [PATCH]]" format
function                                             old     new   delta
xopen_stdin                                            -      15     +15
patch_main                                          2075    2041     -34

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-22 05:39:15 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
867ffb9616 platform.h: regularize endian detection
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:24:40 +02:00
Denys Vlasenko
9768a82eb0 *: fix "see file License ..." - the file is named LICENSE (in uppercase)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 03:04:14 +02:00
Denys Vlasenko
c9b9750a0e libbb: factor out common code from mpstat/iostat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 02:49:21 +02:00
Denys Vlasenko
7783248eaa *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12 14:14:45 +02:00
Denys Vlasenko
f03fc7d77a ntpd: mention -N in help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-11 05:15:52 +02:00
Bradley M. Kuhn
c97131c2af wget: implement -T SEC; rework progress meter to not use signals (it was unsafe)
function                                             old     new   delta
retrieve_file_data                                   364     450     +86
bb_progress_update                                   615     682     +67
packed_usage                                       27406   27422     +16
wget_main                                           2440    2453     +13
static.wget_longopts                                 145     155     +10
progress_meter                                       199     159     -40
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/1 up/down: 192/-40)           Total: 152 bytes

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-08 02:51:20 +02:00
Denys Vlasenko
0d98b4409b udhcpc: add -v to help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-07 02:56:43 +02:00
Waldemar Brodkorb
95b83ba4f8 OpenBSD compatibility
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-06 09:17:26 +02:00
Denys Vlasenko
7a07b0ee6a dc: make it use long longs for integer ops
function                                             old     new   delta
print_base                                           176     238     +62
or                                                    91     103     +12
eor                                                   91     103     +12
and                                                   91     103     +12
not                                                   60      64      +4
mod                                                  103     105      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 104/0)             Total: 104 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-29 04:00:27 +02:00
Jeremie Koenig
816ed971e4 libbb.h: add device names for Hurd and FreeBSD
Adapted from include.libbb.diff from the Debian kFreeBSD people:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:23 +02:00
Denys Vlasenko
51ca7761a3 cttyhack: move build system bits into cttyhack.c, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-16 17:16:40 +02:00
Denys Vlasenko
771f1995a9 ash: move config stuff into ash.c, no code chages
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-16 14:31:34 +02:00
Denys Vlasenko
202a2d1219 hush: make set -x support optional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-16 12:36:14 +02:00
Denys Vlasenko
8fa1f5d543 hush: fix faloout from previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-15 08:18:46 +02:00
Pascal Bellard
926031b764 *: introduce and use xfork() and xvfork()
function                                             old     new   delta
launch_helper                                        170     169      -1
setup_heredoc                                        312     302     -10
handle_dir_common                                    367     354     -13
expand_vars_to_list                                 2456    2443     -13
open_transformer                                      89      74     -15
data_extract_to_command                              439     423     -16
do_ipaddr                                           1406    1389     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85)             Total: -85 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 15:32:38 +02:00
Pascal Bellard
21e8e8da64 libbb: introduce and use BB_EXECVP_or_die()
function                                             old     new   delta
BB_EXECVP_or_die                                       -      47     +47
time_main                                           1042    1043      +1
chrt_main                                            371     364      -7
ionice_main                                          292     282     -10
setsid_main                                           69      56     -13
nohup_main                                           236     223     -13
cttyhack_main                                        266     253     -13
chroot_main                                           94      81     -13
chpst_main                                           746     733     -13
timeout_main                                         297     279     -18
taskset_main                                         541     522     -19
vfork_child                                           67      45     -22
parse                                                975     953     -22
lpd_main                                             770     748     -22
launch_helper                                        192     170     -22
tcpudpsvd_main                                      1810    1782     -28
nice_main                                            190     156     -34
env_main                                             242     206     -36
run_command                                          221     174     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352)         Total: -304 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 00:57:03 +02:00
Lauri Kasanen
7c1b2b5420 losetup: use LOOP_foo defines
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 00:04:03 +02:00
Denys Vlasenko
922f6f51db chrt: code shrink
function                                             old     new   delta
show_min_max                                          80      60     -20
packed_usage                                       26929   26896     -33
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-53)             Total: -53 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-01 16:42:27 +02:00
Denys Vlasenko
cd0f6b0c93 consolidate xz format comment. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-01 10:38:10 +02:00
Denys Vlasenko
45f66167fe xz compression detection: avoid the need to seek
function                                             old     new   delta
unpack_unxz                                           12      67     +55
unpack_xz_stream                                    2357    2373     +16
xmalloc_read                                         197     199      +2
setup_unzip_on_fd                                    118      99     -19
rpm2cpio_main                                        222     203     -19
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 73/-38)             Total: 35 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-01 05:12:28 +02:00
Pascal Bellard
ff37799dfe conspy: code shrink
function                                             old     new   delta
conspy_main                                         1446    1444      -2
screen_read_close                                    114     108      -6
screen_char                                          299     293      -6

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-28 15:51:01 +02:00
Denys Vlasenko
77cc2c5738 nc: introduce CONFIG_NC_110_COMPAT option.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-27 04:22:02 +02:00