Commit Graph

26 Commits

Author SHA1 Message Date
Denis Vlasenko
f9d4fc3cf8 switch_root: improve behavior on error; improve help text
*: make "can't execute '%s'" message uniform
2009-04-21 20:40:51 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
b6052724ff open_transformer: do not return fd, it does not change
libbb: adopt zipped read from modprobe-small

function                                             old     new   delta
getoptscmd                                           708     713      +5
qgravechar                                           106     109      +3
huft_build                                          1165    1168      +3
tr_main                                              474     472      -2
open_transformer                                      91      89      -2
evalvar                                             1376    1374      -2
rpm_main                                            1691    1688      -3
qrealloc                                              36      33      -3
get_header_tar_lzma                                   55      52      -3
get_header_tar_gz                                    100      97      -3
get_header_tar_bz2                                    55      52      -3
get_header_tar_Z                                      89      86      -3
find_main                                            418     406     -12
prepare                                              302     283     -19
xmalloc_open_zipped_read_close                       161     135     -26
xmalloc_read                                         248     199     -49
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/13 up/down: 11/-130)         Total: -119 bytes
2008-07-10 17:43:01 +00:00
Denis Vlasenko
fa0b56db76 sendmail: fix wrong vfork usage here too
*: shorten error texts

function                                             old     new   delta
launch_helper                                          -     151    +151
vfork_or_die                                          20       -     -20
sendgetmail_main                                    1946    1848     -98
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 151/-118)           Total: 33 bytes
2008-07-01 16:09:07 +00:00
Denis Vlasenko
82604e9730 revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
58d60c3333 *: introduce and use xfork()
function                                             old     new   delta
xfork                                                  -      20     +20
msh_main                                            1377    1380      +3
mod_process                                          455     446      -9
forkexit_or_rexec                                     30      17     -13
expand_variables                                    1434    1421     -13
open_transformer                                      91      76     -15
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/4 up/down: 23/-50)            Total: -27 bytes
2008-07-01 11:11:24 +00:00
Denis Vlasenko
3da5572bfa *: introduce and use xvfork()
function                                             old     new   delta
time_main                                           1052    1285    +233
crontab_main                                         623     856    +233
ifupdown_main                                       2202    2403    +201
xvfork                                                 -      20     +20
passwd_main                                         1049    1053      +4
grave                                               1068    1066      -2
script_main                                          935     921     -14
vfork_or_die                                          20       -     -20
vfork_compressor                                     206     175     -31
open_as_user                                         109       -    -109
popen2                                               218       -    -218
edit_file                                            910     690    -220
run_command                                          268       -    -268
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 4/4 up/down: 691/-882)         Total: -191 bytes
2008-07-01 10:40:41 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
2649f215ae open_transformer: fix bug of calling exit instead of _exit
open_transformer: don't leak compressed descriptor anymore
recursive_action: tiny shrink
2008-06-26 03:26:57 +00:00
Bernhard Reutner-Fischer
636a1f85e8 - use EXIT_{SUCCESS,FAILURE}. No object-code changes 2008-05-19 09:29:47 +00:00
Denis Vlasenko
5a07a1d255 tar: move vfork into separate function (smaller code)
open_transformer: more informative error messages

function                                             old     new   delta
vfork_compressor                                       -     210    +210
writeTarFile                                         547     299    -248
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 210/-248)          Total: -38 bytes
2008-04-21 21:56:07 +00:00
Denis Vlasenko
3718832a15 *: more readable handling of pipe fds. No code changes. 2008-02-16 13:20:56 +00:00
Denis Vlasenko
847fa779af *: tidy up usage of char **environ 2008-01-28 22:45:43 +00:00
Denis Vlasenko
059c91711f open_transformer: do not duplicate "<program> -cf -"
text    data     bss     dec     hex filename
 677858     738    7236  685832   a7708 busybox_old
 677804     738    7236  685778   a76d2 busybox_unstripped
2007-11-12 02:13:12 +00:00
Denis Vlasenko
bf8fcaceb7 open_transformer: fix vda's goofup 2007-09-09 11:20:55 +00:00
Denis Vlasenko
211f7f88ae tar + gzip/bzip2/etc: support NOMMU machines (by Alex Landau <landau_alex@yahoo.com>) 2007-09-05 11:48:32 +00:00
Denis Vlasenko
7e0fbf9c26 tar: conditionally don't wait for vforked child to exec, as it always
works right on Linux, and anyway mayresult only on less-than-clear error
message only, it will not cause tar to misbehave.

function                                             old     new   delta
open_transformer                                      98      80     -18
writeTarFile                                         714     547    -167
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-185)           Total: -185 bytes
   text    data     bss     dec     hex filename
 770651    1051   10764  782466   bf082 busybox_old
 770463    1051   10764  782278   befc6 busybox_unstripped
2007-09-04 19:33:22 +00:00
Denis Vlasenko
9a7d38fe24 delete tons of extra #includes 2007-05-31 22:42:12 +00:00
Denis Vlasenko
5a6aeddfa7 xpipe: introduce (saves ~170 bytes)
udhcp/signalpipe.c: use pipe instead of socketpair.
2007-05-26 16:44:20 +00:00
Denis Vlasenko
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +00:00
Denis Vlasenko
97a8dd3857 g[un]zip: add support for -v (verbose).
Add CONFIG_DESKTOP, almost all bloat from this change
is hidden under that.
2006-10-01 15:55:11 +00:00
"Robert P. J. Day"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
Bernhard Reutner-Fischer
cfb53dfd5e - include proper prototypes in libunarchive. 2006-04-02 21:50:01 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Glenn L McGrath
20872be9a4 Dont close original file handle, we may need it later. 2003-11-18 21:31:19 +00:00
Glenn L McGrath
5699b8525e Move from read_gz to the pipe()+fork() method.
open_transformer(), common code for pipe+fork.
Function pointer for read() no longer needed.
Allow inflate to be initialised with a specified buffer size to avoid
over-reading.
Reset static variables in inflate_get_next_window to fix a bug where
only the first file in a .zip would be be extracted.
2003-11-15 23:19:05 +00:00