Commit Graph

211 Commits

Author SHA1 Message Date
Denis Vlasenko
27842288b3 libbb: make xrealloc_vector zero out the realloc'ed tail
function                                             old     new   delta
xrealloc_vector_helper                                51      76     +25
man_main                                             712     705      -7
act                                                  250     234     -16
create_list                                           91      70     -21
getopt_main                                          695     664     -31
load_dep_bb                                          281     248     -33
fileAction                                           744     709     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 25/-143)          Total: -118 bytes
2008-08-04 13:20:36 +00:00
Bernhard Reutner-Fischer
3e8669f359 - wrap overlong lines (Cristian Ionescu-Idbohrn)
- s/\.  /. /g;# (me)
2008-07-22 18:27:53 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
deeed59de0 libbb: introduce and use xrealloc_vector
function                                             old     new   delta
xrealloc_vector_helper                                 -      51     +51
create_list                                           84      99     +15
getopt_main                                          690     695      +5
passwd_main                                         1049    1053      +4
get_cached                                            85      89      +4
msh_main                                            1377    1380      +3
add_match                                             42      41      -1
read_lines                                           720     718      -2
grave                                               1068    1066      -2
fill_match_lines                                     143     141      -2
add_to_dirlist                                        67      65      -2
add_input_file                                        49      47      -2
act                                                  252     250      -2
fsck_main                                           2252    2246      -6
man_main                                             765     757      -8
bb_internal_initgroups                               228     220      -8
cut_main                                            1052    1041     -11
add_edge_to_node                                      55      43     -12
dpkg_main                                           3851    3835     -16
ifupdown_main                                       2202    2178     -24
sort_main                                            838     812     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124)          Total: -42 bytes
2008-07-08 05:14:36 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +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
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
148f67af9d ssd: fix missed + in prev commit 2008-07-01 10:05:12 +00:00
Denis Vlasenko
7987a1844b ssd: do not stat -x EXECUTABLE, it is not needed anymore
ssd: use PATH
ssd: fix -a without -x case
ssd: fix help text
ssd: CLOSE_EXTRA_FDS in MMU case too
ssd: add testsuite
2008-07-01 10:00:46 +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
7049ff8696 whitespace fixes. no code changes 2008-06-25 09:53:17 +00:00
Denis Vlasenko
b67004b2ae ssd: fix comment 2008-06-20 18:24:14 +00:00
Denis Vlasenko
d50dda8c35 *: use llist_pop for traverse-and-free list operation
function                                             old     new   delta
append_file_list_to_list                             109     111      +2
udhcpc_main                                         2414    2413      -1
run_parts_main                                       325     324      -1
od_main                                             2324    2323      -1
getopt_main                                          709     707      -2
env_main                                             253     251      -2
sed_main                                             659     656      -3
ps_main                                              522     519      -3
traceroute_main                                     3960    3954      -6
sort_main                                            844     838      -6
diff_main                                            866     858      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33)            Total: -31 bytes
2008-06-15 05:40:56 +00:00
Denis Vlasenko
f2cccbce37 mktemp: make default tempfile template shorter;
make help text more understandable
2008-06-08 20:40:33 +00:00
Denis Vlasenko
f592aa36f3 which: -a support (needed for bfin uclibc build script)
real support (with CONFIG_DESKTOP=y): 120+ bytes:
   text	   data	    bss	    dec	    hex	filename
 807958	    624	   7036	 815618	  c7202	busybox_old
 808085	    624	   7036	 815745	  c7281	busybox_unstripped

"fake" support (with CONFIG_DESKTOP unset): ~45 bytes:
   text	   data	    bss	    dec	    hex	filename
 797790	    611	   6996	 805397	  c4a15	busybox_old
 797834	    611	   6996	 805441	  c4a41	busybox_unstripped
2008-06-05 13:33:59 +00:00
Denis Vlasenko
c05b1684a0 mktemp: make argument optional (coreutil 6.12 compat)
function                                             old     new   delta
mktemp_main                                          157     174     +17
packed_usage                                       24508   24504      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 17/-4)              Total: 13 bytes
2008-06-05 12:06:00 +00:00
Bernhard Reutner-Fischer
636a1f85e8 - use EXIT_{SUCCESS,FAILURE}. No object-code changes 2008-05-19 09:29:47 +00:00
Denis Vlasenko
e125a683a7 start_stop_daemon: add -test, fix -x to not match by inode,
vastly improve hext text. (mostly by Roy Marples <roy AT marples.name>)

function                                             old     new   delta
packed_usage                                       24124   24190     +66
start_stop_daemon_main                               959     991     +32
start_stop_daemon_longopts                           149     156      +7
check                                               1632    1589     -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 105/-43)            Total: 62 bytes
2008-05-18 21:17:52 +00:00
Denis Vlasenko
77ad97f199 more -Wall warning fixes from Cristian Ionescu-Idbohrn.
This time it resulted in small code changes:

function                                             old     new   delta
nexpr                                                820     828      +8
tail_main                                           1200    1202      +2
wrapf                                                166     167      +1
parse_mount_options                                  227     209     -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18)             Total: -7 bytes
2008-05-13 02:27:31 +00:00
Denis Vlasenko
647c20cfc2 start_stop_daemon: try to clarify intended meaning of the options 2008-05-07 14:52:01 +00:00
Denis Vlasenko
e061226668 start_stop_daemon: use existing global variable
start_stop_daemon_main                               976     959     -17
2008-04-30 13:58:31 +00:00
Denis Vlasenko
1f228985b2 whitespace fixes. no code changes 2008-04-22 00:16:29 +00:00
Denis Vlasenko
fe493479e2 start_stop_daemon: stat executable only once
function                                             old     new   delta
start_stop_daemon_main                               954     976     +22
check                                               1661    1632     -29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 22/-29)             Total: -7 bytes
2008-04-20 14:25:26 +00:00
Denis Vlasenko
25cfe4996e libbb: prevent xmalloc_open_read_close from dying on seek failure
start_stop_daemon: use open_read_close instead of xmalloc_open_read_close
start_stop_daemon: use local structure instead of global one

function                                             old     new   delta
check                                               1620    1661     +41
xmalloc_open_read_close                              171     190     +19
start_stop_daemon_main                               976     954     -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 60/-22)             Total: 38 bytes
2008-04-20 01:27:59 +00:00
Denis Vlasenko
85d788e491 start_stop_daemon: optimization - do not pass paramenter, use
existing globals instead

function                                             old     new   delta
start_stop_daemon_main                               792     976    +184
check                                               1618    1620      +2
do_procinit                                          196       -    -196
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/0 up/down: 186/-196)          Total: -10 bytes
2008-04-19 21:30:52 +00:00
Denis Vlasenko
daeddee442 start_stop_daemon: do not stop /proc scan prematurely
function                                             old     new   delta
do_procinit                                          185     196     +11
2008-04-19 20:19:45 +00:00
Denis Vlasenko
d9c51e9fa7 start-stop-daemon: make --exec follow symlinks
by Joakim Tjernlund <joakim.tjernlund AT transmode.se>

function                                             old     new   delta
check                                               1591    1618     +27
start_stop_daemon_main                               770     792     +22
2008-04-19 19:06:23 +00:00
Denis Vlasenko
5a96c3eab6 start_stop_daemon: mark argc as unused 2008-04-19 17:40:29 +00:00
Denis Vlasenko
c93b162248 patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)
*: removal of #include <getopt.h>
2008-03-23 22:55:25 +00:00
Denis Vlasenko
68404f13d4 *: add -Wunused-parameter; fix resulting breakage
function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko
19fb67eee4 run-parts: add --reverse 2008-02-28 21:30:22 +00:00
Denis Vlasenko
04bb2d2d06 start_stop_daemon: stop using data/bss
function                                             old     new   delta
start_stop_daemon_main                               749     770     +21
do_procinit                                          184     185      +1
quiet                                                  1       -      -1
userspec                                               4       -      -4
user_id                                                4       -      -4
signal_nr                                              4       -      -4
pidfile                                                4       -      -4
found                                                  4       -      -4
execname                                               4       -      -4
cmdname                                                4       -      -4
------------------------------------------------------------------------------
(add/remove: 0/8 grow/shrink: 2/0 up/down: 22/-29)             Total: -7 bytes
2008-02-26 16:08:02 +00:00
Denis Vlasenko
e7b43cf59f trivial fixes to config system 2008-02-19 23:42:22 +00:00
Denis Vlasenko
65581f3ed1 mktemp: support -p DIR (Timo Teras <timo.teras at iki.fi>)
packed_usage                                       23595   23660     +65
mktemp_main                                          139     157     +18
2008-02-09 06:26:53 +00:00
Denis Vlasenko
6446c2d4ab which: fix testsuite failure
pidof: do not output empty line if nothing found
testsuite: disable false positive
2007-11-25 04:54:13 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
2a1d024333 run_parts: make it sort executables by name (required by API) 2007-09-23 18:34:49 +00:00
Denis Vlasenko
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
1caca34aa6 start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>
dhcpc: fixed "ifupdown + udhcpc_without_pidpile_creation" bug
2007-08-02 10:14:29 +00:00
Denis Vlasenko
a1b16f4d5c start_stop_daemon: NOMMU fix; smaller fixes 2007-07-31 17:09:44 +00:00
Denis Vlasenko
990d0f63ee Replace index_in_[sub]str_array with index_in_[sub]strings,
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.

   text    data     bss     dec     hex filename
 781266    1328   11844  794438   c1f46 busybox_old
 781010    1328   11844  794182   c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
bdc88fdc68 rework long option handling. saves ~1.2k
function                                             old     new   delta
tar_longopts                                           -     222    +222
static.udhcpc_longopts                                 -     192    +192
start_stop_daemon_longopts                             -     150    +150
getopt32                                            1045    1185    +140
static.wget_longopts                                   -     111    +111
static.od_longopts                                     -     105    +105
getopt_longopts                                        -      96     +96
install_longopts                                       -      67     +67
ipcalc_longopts                                        -      63     +63
static.hwclock_longopts                                -      54     +54
ftpgetput_longopts                                     -      52     +52
static.dumpleases_longopts                             -      32     +32
env_longopts                                           -      31     +31
runparts_longopts                                      -      30     +30
mv_longopts                                            -      24     +24
mkdir_longopts                                         -      19     +19
find_pair                                            164     180     +16
bb_null_long_options                                   -      16     +16
setconsole_longopts                                    -      10     +10
display_speed                                         91      98      +7
collect_blk                                          467     474      +7
show_color                                             4       1      -3
ls_main                                              913     904      -9
bb_default_long_options                               16       -     -16
ls_color_opt                                          32      10     -22
setconsole_long_options                               32       -     -32
arith                                               2077    2030     -47
mv_long_options                                       48       -     -48
mkdir_long_options                                    48       -     -48
env_long_options                                      48       -     -48
static.options                                       248     184     -64
runparts_long_options                                 80       -     -80
ftpgetput_long_options                                96       -     -96
static.hwclock_long_options                          112       -    -112
install_long_options                                 112       -    -112
static.long_options                                  144       -    -144
static.wget_long_options                             160       -    -160
longopts                                             160       -    -160
static.arg_options                                   304       -    -304
tar_long_options                                     320       -    -320
long_options                                         384       -    -384
------------------------------------------------------------------------------
(add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209)     Total: -765 bytes
   text    data     bss     dec     hex filename
 782618    1328   11900  795846   c24c6 busybox_old
 781354    1328   11900  794582   c1fd6 busybox_unstripped
2007-07-23 17:14:14 +00:00
Denis Vlasenko
091965768d libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive options
find_pair                                            164     180     +16
passwd_main                                         1222    1230      +8
display_speed                                         91      96      +5
msh_main                                            1335    1339      +4
qrealloc                                              38      36      -2
refresh                                             1190    1182      -8
cut_main                                             543     532     -11
sendCgi                                             1807    1794     -13
getopt32                                            1063    1045     -18
arith                                               2077    2030     -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99)            Total: -66 bytes
   text    data     bss     dec     hex filename
 781548    1168   11900  794616   c1ff8 busybox_old
 781452    1168   11900  794520   c1f98 busybox_unstripped
2007-07-21 13:27:44 +00:00
Denis Vlasenko
dc757aa16c introduce and use bb_basename()
function                                             old     new   delta
bb_basename                                            -      26     +26
sv_main                                             1226    1225      -1
passwd_main                                         1985    1983      -2
showdirs                                             482     478      -4
sendCgi                                             1811    1807      -4
make_device                                         1354    1350      -4
handleIncoming                                      2443    2439      -4
func_name                                             82      78      -4
service_name                                        2292    2285      -7
main                                                 909     901      -8
cmp_main                                             555     547      -8
test_main                                            434     422     -12
act                                                  228     216     -12
find_pair                                            180     164     -16
rmmod_main                                           298     280     -18
find_pid_by_name                                     156     134     -22
modprobe_main                                       1606    1576     -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156)         Total: -130 bytes
   text    data     bss     dec     hex filename
 734933    3028   14400  752361   b7ae9 busybox_old
 734801    3028   14400  752229   b7a65 busybox_unstripped
2007-06-30 08:04:05 +00:00
Denis Vlasenko
f5f75c5e82 remove nearly-duplicate PATHs in several places
function                                             old     new   delta
bb_PATH_root_path                                      -      35     +35
varunset                                              60      58      -2
arith                                               2042    2033      -9
bb_default_root_login_path                            30       -     -30
.rodata                                           128794  128762     -32
which_main                                           152     117     -35
defpathvar                                            40       -     -40
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/4 up/down: 35/-148)          Total: -113 bytes
2007-06-12 22:35:19 +00:00
Denis Vlasenko
cc5e090f12 move several applets to more correct ex-project. No code changes. 2007-06-12 08:12:33 +00:00
Denis Vlasenko
74324c8666 Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly.
code: -103 bytes
2007-06-04 10:16:52 +00:00
Denis Vlasenko
9a7d38fe24 delete tons of extra #includes 2007-05-31 22:42:12 +00:00
Denis Vlasenko
fad2b86c9e use "glibc errno" trick not only for ash, but for entire busybox
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228)        Total: -89 bytes
2007-05-31 22:16:38 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
d4728145e3 run_parts: do not check path portion of a name for "bad chars".
Needed for ifupdown. Patch by "Gabriel L. Somlo" <somlo@cmu.edu>
2007-04-29 23:38:12 +00:00
Denis Vlasenko
51742f4bb0 style fixes. No code changes 2007-04-12 00:32:05 +00:00
Denis Vlasenko
8d9f495d68 getopt32: fix llist_t options ordering. llist_rev is not unused.
function                                             old     new   delta
tar_main                                             705     695     -10
sort_main                                            928     918     -10
decode_format_string                                 886     876     -10
run_parts_main                                       197     185     -12
ps_main                                              513     500     -13
wget_main                                           2764    2750     -14
awk_main                                            1014    1000     -14
od_main                                             2886    2866     -20
llist_rev                                             25       -     -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128)           Total: -128 bytes
2007-04-08 15:08:42 +00:00
Denis Vlasenko
bbd695d801 find: fix handling of -prune
recursive_actions: uppercase flag constants
2007-04-08 10:52:28 +00:00
Bernhard Reutner-Fischer
3e816c1252 - fold recurse, depthFirst and dereference params into one param flags.
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-29 10:30:50 +00:00
Denis Vlasenko
c7d4b98cbd run_parts: I was wrong, NULL termination is already done because
G is pre-initialized to 0.
2007-03-28 22:05:38 +00:00
Denis Vlasenko
45cd089df1 run_parts: NULL-terminate list of arguments; fix perror/error usage 2007-03-28 22:04:04 +00:00
Bernhard Reutner-Fischer
b7cffd4bed - rewrite run-parts
text    data     bss     dec     hex filename
   1029       0       0    1029     405 debianutils/run_parts.o-old
    478       0       0     478     1de debianutils/run_parts.o-new-bare
    600       0       0     600     258 debianutils/run_parts.o-new-full

bare, i.e. without long opts and fancy stuff
./scripts/bloat-o-meter bb_old busybox_unstripped   function                                             old     new   delta
act                                                    -     215    +215
run_parts_main                                       216     201     -15
valid_name                                            50       -     -50
runparts_long_options                                 64       -     -64
.rodata                                           124323  124163    -160
run_parts                                            513       -    -513
------------------------------------------------------------------------------
(add/remove: 1/3 grow/shrink: 0/2 up/down: 215/-802)         Total: -587 bytes
2007-03-28 20:35:13 +00:00
Denis Vlasenko
5a142025d3 move everything to new NOMMU helpers, except udhcp 2007-03-26 13:20:54 +00:00
Denis Vlasenko
cce38586ae start_stop_daemon: add -chuid support 2007-02-26 22:47:42 +00:00
Denis Vlasenko
6ca0444420 syslogd: fix "readpath bug" by using readlink instead
libbb: rename xgetcwd and xreadlink
2007-02-11 16:19:28 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
9d938732d0 fix which-uses-default-path 2007-01-28 15:31:19 +00:00
Denis Vlasenko
9af7c9d6b6 openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
(will close all fd's > 2 on daemonization now)
getty: fix "getty -" support, and also do not try to chown/chmod "-"
telnetd: fix "lost ctty" bug
Yet another attempt on saner function names:
bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2007-01-19 21:19:35 +00:00
Denis Vlasenko
9a44c4f91c bb_xget[pw/gr]nam were horribly misnamed - fixed.
uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam
2006-12-28 05:44:47 +00:00
Denis Vlasenko
b8c77b5b25 start_stop_daemon: make code a bit more readable 2006-12-17 19:43:10 +00:00
Denis Vlasenko
b131b271a0 start_stop_daemon: fix bug where any program name was "matching"
processes for which readlink(/proc/N/exe) fails
2006-12-17 17:30:01 +00:00
Denis Vlasenko
079f8afa0a style cleanup: return(a) -> return a, part 1 2006-11-27 16:49:31 +00:00
Denis Vlasenko
e5667c1cfe Closing bug 730. libbb run_parts is using scandir (a GNUism),
and it is used only by run_parts applet, so move it there.
Also saved ~30 bytes (prolly gcc autoinlining...).
2006-11-26 20:13:39 +00:00
Denis Vlasenko
89f0b3486d rodata cleanup. "unable to" == "cannot". -300 bytes 2006-11-18 22:04:09 +00:00
Denis Vlasenko
61126ab30a small fixes: using fd-based io instead of FILE*-based,
missed O_TRUNC, etc
2006-11-18 22:03:26 +00:00
Denis Vlasenko
f0ed376eda remove bb_printf and the like 2006-10-26 23:21:47 +00:00
Denis Vlasenko
456fa6c0b1 readlink: do not emit errors if file doesnt not exist / not a link
getopt32: add =N support
2006-10-20 18:36:55 +00:00
Denis Vlasenko
f6f43df60b ifupdown: stop emitting annoying/misleading error messages.
Patch by Gabriel Somlo <somlo at cmu.edu>
2006-10-11 22:16:56 +00:00
Bernhard Reutner-Fischer
1ac42bf66e - add option -t
mkinitrd and mkinitramfs both require -t.
2006-10-10 15:28:41 +00:00
Denis Vlasenko
ca3c981c07 start_stop_daemon: add -N <nice> compat
[re]nice: add support for -nNNN w/o spaces, -NNN (nice only),
          simplified code
2006-10-08 23:36:17 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
01c27fc5ac which: -84 bytes 2006-10-05 21:10:53 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Bernhard Reutner-Fischer
7fee0c4357 - fix copy'n paste errors that got introduced when switching to the shorter boilerplate.
No object code changes.
2006-09-13 16:39:19 +00:00
Rob Landley
8cedabaee0 Patch from Natanael Copa to make start-stop-daemon just use readlink and
strcmp to check if a program is already running.
2006-09-04 18:59:39 +00:00
Rob Landley
8479063667 Bugfix from Jason Schoon: send the right signal with -s. 2006-08-28 20:30:27 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes...  General cleanup pass.  What I've
been doing for the last couple days.

And it conflicts!  I've removed httpd.c from this checkin due to somebody else
touching that file.  It builds for me.  I have to catch a bus.  (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Rob Landley
f86a5ba510 Remove unnecessary consts. 2006-07-19 21:45:30 +00:00
"Robert P. J. Day"
fc2aea1a76 Rearrange order of type qualifiers. 2006-07-18 11:33:44 +00:00
Rob Landley
f0623a2c98 Patch from Thaddeus Ternes, adding chuid to start-stop-daemon. 2006-07-17 00:35:07 +00:00
Bernhard Reutner-Fischer
66e3a222cd - minor shrinkage 2006-06-14 16:17:50 +00:00
Bernhard Reutner-Fischer
2f6a317944 - fix stupid typo from last checkin 2006-06-12 14:34:01 +00:00
Bernhard Reutner-Fischer
a926f8e50a - add fancy mode to start-stop-daemon to support --oknodo and --verbose 2006-06-11 17:24:01 +00:00
Bernhard Reutner-Fischer
e15d7573a1 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Bernhard Reutner-Fischer
01d23ade57 - add central knob to turn off getopt_long everywhere. EXPERIMENTAL!
Adds "Enable getopt long" under "General options", default y.
  Send patches to fix getopt_ulflags and run_parts.c if you turn this off..
  See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
2006-05-26 20:19:22 +00:00
Bernhard Reutner-Fischer
b1629b1b2a - remove emacs layout block as suggested by Robert P.J. Day
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Rob Landley
5371a953ca The gnu extension to have realpath() malloc its buffer when handed a NULL
isn't implemented in uClibc, so we can't use it.
2006-05-17 04:09:14 +00:00
Mike Frysinger
39440e520c pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list 2006-05-13 02:33:09 +00:00
Rob Landley
a389651115 Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
2ec922eed5 Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Bernhard Reutner-Fischer
2c99851181 - patch from Denis Vlasenko to add and use bb_xdaemon() 2006-04-12 18:09:26 +00:00