oweals/busybox.git
17 years agohush: remove env builtin (it is buggy). Add comments
Denis Vlasenko [Wed, 2 May 2007 23:39:04 +0000 (23:39 -0000)]
hush: remove env builtin (it is buggy). Add comments

17 years agofix suid config handling
Denis Vlasenko [Wed, 2 May 2007 23:01:32 +0000 (23:01 -0000)]
fix suid config handling

17 years agoifupdown: small optimization (avoid doing useless work if we are
Denis Vlasenko [Wed, 2 May 2007 22:22:23 +0000 (22:22 -0000)]
ifupdown: small optimization (avoid doing useless work if we are
not going to update state file)

17 years agoallow people to stick custom things into Makefile.local so they dont need to update...
Mike Frysinger [Wed, 2 May 2007 22:07:03 +0000 (22:07 -0000)]
allow people to stick custom things into Makefile.local so they dont need to update busybox files while integrating into other build systems (like uClinux-dist)

17 years agoifupdown: mke it possible to use DHCP clients different from udhcp.
Denis Vlasenko [Wed, 2 May 2007 22:04:38 +0000 (22:04 -0000)]
ifupdown: mke it possible to use DHCP clients different from udhcp.

17 years agohush: simplify debugging prints a little bit
Denis Vlasenko [Wed, 2 May 2007 21:40:23 +0000 (21:40 -0000)]
hush: simplify debugging prints a little bit

17 years agoklogd: remove dependency on syslogd
Denis Vlasenko [Wed, 2 May 2007 21:39:29 +0000 (21:39 -0000)]
klogd: remove dependency on syslogd

17 years agoifupdown: reread state file before rewriting it.
Denis Vlasenko [Wed, 2 May 2007 21:38:44 +0000 (21:38 -0000)]
ifupdown: reread state file before rewriting it.
Fixes "ifup started another ifup" state corruption bug.
Patch by Natanael Copa <natanael.copa@gmail.com>.

17 years agohush: add debugging for tracing execution,
Denis Vlasenko [Wed, 2 May 2007 15:35:45 +0000 (15:35 -0000)]
hush: add debugging for tracing execution,
add FIXME for 'true | exit 3; echo $?' case

17 years agohush: fix incorrect exitcodes without job control
Denis Vlasenko [Wed, 2 May 2007 15:34:47 +0000 (15:34 -0000)]
hush: fix incorrect exitcodes without job control

17 years agotest: code size saving, no logic changes
Denis Vlasenko [Tue, 1 May 2007 20:07:29 +0000 (20:07 -0000)]
test: code size saving, no logic changes
ps: fix warning, make a bit smaller
kill -l: make smaller & know much more signals

function                                             old     new   delta
get_signum                                           121     153     +32
kill_main                                            826     843     +17
get_signame                                           44      36      -8
signals                                              252     224     -28
.rodata                                           131955  131923     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 49/-68)            Total: -19 bytes

17 years agoash,kill: use common code for kill applet/builtin
Denis Vlasenko [Sun, 29 Apr 2007 23:42:54 +0000 (23:42 -0000)]
ash,kill: use common code for kill applet/builtin

# make bloatcheck
function                                             old     new   delta
evaltreenr                                           644     654     +10
evaltree                                             644     654     +10
parse_conf                                          1440    1444      +4
dpkg_deb_main                                        426     429      +3
ed_main                                             3319    3321      +2
passwd_main                                         2093    2091      -2
kill_main                                            830     826      -4
singlemount                                         4609    4601      -8
find_command                                         962     954      -8
get_lcm                                              123     105     -18
.rodata                                           132243  132147     -96
killcmd                                              449     120    -329
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/7 up/down: 29/-465)          Total: -436 bytes

# size busybox_old busybox_unstripped
   text    data     bss     dec     hex filename
 723901    2940   27504  754345   b82a9 busybox_old
 723457    2940   27504  753901   b80ed busybox_unstripped

17 years agorun_parts: do not check path portion of a name for "bad chars".
Denis Vlasenko [Sun, 29 Apr 2007 23:38:12 +0000 (23:38 -0000)]
run_parts: do not check path portion of a name for "bad chars".
Needed for ifupdown. Patch by "Gabriel L. Somlo" <somlo@cmu.edu>

17 years agoash: fix infinite loop on exit if tty is not there anymore
Denis Vlasenko [Sat, 28 Apr 2007 22:39:02 +0000 (22:39 -0000)]
ash: fix infinite loop on exit if tty is not there anymore

17 years agohush: make job control and interactiveness configurable, part 2
Denis Vlasenko [Sat, 28 Apr 2007 16:48:27 +0000 (16:48 -0000)]
hush: make job control and interactiveness configurable, part 2

17 years agohush: make job control and interactiveness configurable, part 1
Denis Vlasenko [Sat, 28 Apr 2007 16:48:04 +0000 (16:48 -0000)]
hush: make job control and interactiveness configurable, part 1

17 years agohush: make hush properly detect EOF on stdin (even interactive one -
Denis Vlasenko [Sat, 28 Apr 2007 16:47:08 +0000 (16:47 -0000)]
hush: make hush properly detect EOF on stdin (even interactive one -
think about pty being destroyed) and exit.

17 years agohush: add Ctrl-C handling to nofork case
Denis Vlasenko [Sat, 28 Apr 2007 16:45:59 +0000 (16:45 -0000)]
hush: add Ctrl-C handling to nofork case

17 years agohush: better signal handling across ctrl-z
Denis Vlasenko [Sat, 28 Apr 2007 16:45:22 +0000 (16:45 -0000)]
hush: better signal handling across ctrl-z

17 years agohush: fix nofork + ctrl-Z clobbering of globals
Denis Vlasenko [Sat, 28 Apr 2007 16:43:18 +0000 (16:43 -0000)]
hush: fix nofork + ctrl-Z clobbering of globals

17 years agohush: add ctrl-Z handling for nofork'ed case
Denis Vlasenko [Sat, 28 Apr 2007 16:42:11 +0000 (16:42 -0000)]
hush: add ctrl-Z handling for nofork'ed case

17 years agofind_root_device: use lstat - don't follow links
Denis Vlasenko [Sat, 21 Apr 2007 23:28:03 +0000 (23:28 -0000)]
find_root_device: use lstat - don't follow links

17 years agohush: make Ctrl-Z work (at least sometimes)
Denis Vlasenko [Sat, 21 Apr 2007 23:27:30 +0000 (23:27 -0000)]
hush: make Ctrl-Z work (at least sometimes)

17 years agohust: add a comment
Denis Vlasenko [Sat, 21 Apr 2007 17:28:51 +0000 (17:28 -0000)]
hust: add a comment

17 years agohush: fix more backgrounding bugs. Plenty of them remains still.
Denis Vlasenko [Sat, 21 Apr 2007 13:42:52 +0000 (13:42 -0000)]
hush: fix more backgrounding bugs. Plenty of them remains still.

17 years agohush: explain why "pipe; exit $?" doesn't show correct exitcode
Denis Vlasenko [Sat, 21 Apr 2007 10:01:14 +0000 (10:01 -0000)]
hush: explain why "pipe; exit $?" doesn't show correct exitcode

17 years agohush: do not print message if killed by signal;
Denis Vlasenko [Sat, 21 Apr 2007 10:00:01 +0000 (10:00 -0000)]
hush: do not print message if killed by signal;
move some functions up before main()

17 years agohush: begin fixing non-functional job control
Denis Vlasenko [Sat, 21 Apr 2007 00:03:36 +0000 (00:03 -0000)]
hush: begin fixing non-functional job control

17 years agohush: small code shrink; style fixes
Denis Vlasenko [Fri, 20 Apr 2007 08:35:45 +0000 (08:35 -0000)]
hush: small code shrink; style fixes

17 years agodd: NOEXEC fix
Denis Vlasenko [Thu, 19 Apr 2007 20:16:14 +0000 (20:16 -0000)]
dd: NOEXEC fix
dd: correct wrongly capitalized constant

17 years agodd: fix skip= parse error (spotted by Dirk Clemens <develop@cle-mens.de>)
Denis Vlasenko [Thu, 19 Apr 2007 20:08:19 +0000 (20:08 -0000)]
dd: fix skip= parse error (spotted by Dirk Clemens <develop@cle-mens.de>)

17 years agostty: fix option parsing bug (spotted by Sascha Hauer <s.hauer@pengutronix.de>)
Denis Vlasenko [Thu, 19 Apr 2007 19:55:54 +0000 (19:55 -0000)]
stty: fix option parsing bug (spotted by Sascha Hauer <s.hauer@pengutronix.de>)

17 years agodoc: add README on shell job control
Denis Vlasenko [Thu, 19 Apr 2007 17:26:34 +0000 (17:26 -0000)]
doc: add README on shell job control

17 years agoprocps: remove all global variables
Denis Vlasenko [Thu, 19 Apr 2007 14:47:11 +0000 (14:47 -0000)]
procps: remove all global variables
   text    data     bss     dec     hex filename
   1462      14      24    1500     5dc busybox.t2/procps/ps.o
   1484       0       0    1484     5cc busybox.t3/procps/ps.o
   3122       0     252    3374     d2e busybox.t1/procps/top.o
   3117       0       0    3117     c2d busybox.t3/procps/top.o

17 years agops: add -o tty and -o rss support
Denis Vlasenko [Thu, 19 Apr 2007 14:46:14 +0000 (14:46 -0000)]
ps: add -o tty and -o rss support
   1373      14      24    1411     583 busybox.t1/procps/ps.o
   1462      14      24    1500     5dc busybox.t2/procps/ps.o

17 years agoloop device code: readability improvement
Denis Vlasenko [Thu, 19 Apr 2007 00:09:34 +0000 (00:09 -0000)]
loop device code: readability improvement

17 years agoswitch_root: error_msg -> perror_msg, reduce by 22 bytes while at it.
Denis Vlasenko [Wed, 18 Apr 2007 21:40:30 +0000 (21:40 -0000)]
switch_root: error_msg -> perror_msg, reduce by 22 bytes while at it.

17 years ago"Unify base64 handling" is done, remove TODO
Denis Vlasenko [Wed, 18 Apr 2007 21:14:46 +0000 (21:14 -0000)]
"Unify base64 handling" is done, remove TODO

17 years agomake "busybox" w/o args work again, and save 10 bytes in the process.
Denis Vlasenko [Wed, 18 Apr 2007 21:00:21 +0000 (21:00 -0000)]
make "busybox" w/o args work again, and save 10 bytes in the process.

17 years agohush: remove stray semicolon (should change nothing)
Denis Vlasenko [Wed, 18 Apr 2007 17:21:28 +0000 (17:21 -0000)]
hush: remove stray semicolon (should change nothing)

17 years agoether-wake: save a few more bytes of code
Denis Vlasenko [Mon, 16 Apr 2007 23:23:33 +0000 (23:23 -0000)]
ether-wake: save a few more bytes of code

17 years agoether-wake: close bug 1317. Reorder fuctions to avoid
Denis Vlasenko [Mon, 16 Apr 2007 23:16:37 +0000 (23:16 -0000)]
ether-wake: close bug 1317. Reorder fuctions to avoid
forward refs while at it

17 years agoshells: remove few statics and duplicated code
Denis Vlasenko [Mon, 16 Apr 2007 22:34:39 +0000 (22:34 -0000)]
shells: remove few statics and duplicated code
(much more of the same remains, alas)
function                                             old     new   delta
doset                                                330     332      +2
warn                                                  53      51      -2
onecommand                                           463     461      -2
ioecho                                                40      38      -2
forkexec                                            1412    1410      -2
err                                                   81      79      -2
setdash                                               59      56      -3
flag                                                   4       -      -4
msh_main                                            1389    1384      -5
eval                                                 388     381      -7
subgetc                                              759     747     -12
static.local                                          14       -     -14
b_adduint                                             70      52     -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/10 up/down: 2/-73)            Total: -71 bytes

17 years agostyle fixes, no code changes
Denis Vlasenko [Mon, 16 Apr 2007 22:32:04 +0000 (22:32 -0000)]
style fixes, no code changes

17 years agoapplet.c: ruid is needed only if FEATURE_SUID=y
Denis Vlasenko [Mon, 16 Apr 2007 20:55:27 +0000 (20:55 -0000)]
applet.c: ruid is needed only if FEATURE_SUID=y

17 years ago- we unconditionally need ruid. Fixes build error in line 334
Bernhard Reutner-Fischer [Mon, 16 Apr 2007 18:25:46 +0000 (18:25 -0000)]
- we unconditionally need ruid. Fixes build error in line 334

17 years ago- fix compilation when ENABLE_FEATURE_IP_RULE was off
Bernhard Reutner-Fischer [Mon, 16 Apr 2007 14:56:01 +0000 (14:56 -0000)]
- fix compilation when ENABLE_FEATURE_IP_RULE was off

17 years ago- fix compilation if ENABLE_FEATURE_DD_IBS_OBS is off
Bernhard Reutner-Fischer [Mon, 16 Apr 2007 12:21:05 +0000 (12:21 -0000)]
- fix compilation if ENABLE_FEATURE_DD_IBS_OBS is off

17 years agolineedit: state->hist_file doesn't exist if !FEATURE_EDITING_SAVEHISTORY,
Denis Vlasenko [Sun, 15 Apr 2007 13:21:01 +0000 (13:21 -0000)]
lineedit: state->hist_file doesn't exist if !FEATURE_EDITING_SAVEHISTORY,
#ifdef it out

17 years agodoc: fix code example which may provoke warning
Denis Vlasenko [Sun, 15 Apr 2007 11:50:41 +0000 (11:50 -0000)]
doc: fix code example which may provoke warning

17 years agoe2fsprogs: stop using statics in chattr. Minor code shrinkage (-130 bytes)
Denis Vlasenko [Sun, 15 Apr 2007 11:48:27 +0000 (11:48 -0000)]
e2fsprogs: stop using statics in chattr. Minor code shrinkage (-130 bytes)

17 years agodeluser: add optional support for removing users from groups
Denis Vlasenko [Sun, 15 Apr 2007 08:43:23 +0000 (08:43 -0000)]
deluser: add optional support for removing users from groups
(by Tito <farmatito@tiscali.it>)

17 years agoupdate style-guide.txt
Denis Vlasenko [Sun, 15 Apr 2007 08:39:39 +0000 (08:39 -0000)]
update style-guide.txt

17 years agoxargs: simplify word list management
Denis Vlasenko [Sun, 15 Apr 2007 08:38:50 +0000 (08:38 -0000)]
xargs: simplify word list management

17 years agomsh: style fixes
Denis Vlasenko [Sat, 14 Apr 2007 15:08:41 +0000 (15:08 -0000)]
msh: style fixes
shell/README - a place to record things about busybox shells

17 years agolineedit: nuke two unused variables and code which sets them
Denis Vlasenko [Sat, 14 Apr 2007 13:22:09 +0000 (13:22 -0000)]
lineedit: nuke two unused variables and code which sets them
applets: do not even try to read config if run by real root
msh: use named constants (O_RDONLY etc) in open() instead of magic numbers,
     other minor code size reduction.

17 years agolash: recognize and use NOFORK applets
Denis Vlasenko [Sat, 14 Apr 2007 11:16:29 +0000 (11:16 -0000)]
lash: recognize and use NOFORK applets
lash,hush: fix kill buglet (didn't properly recognize ESRCH)

17 years agolineedit: do not try to open NULL history file
Denis Vlasenko [Sat, 14 Apr 2007 10:10:40 +0000 (10:10 -0000)]
lineedit: do not try to open NULL history file

17 years agohush: use NOFORK applets as appropriate. Net reduction of code size.
Denis Vlasenko [Sat, 14 Apr 2007 10:09:57 +0000 (10:09 -0000)]
hush: use NOFORK applets as appropriate. Net reduction of code size.

17 years agoteach find_root_device to deal with /dev/ subdirs
Denis Vlasenko [Fri, 13 Apr 2007 23:59:52 +0000 (23:59 -0000)]
teach find_root_device to deal with /dev/ subdirs
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)

17 years agodpkg: use nitfields which are a bit closer to typical ushort.
Denis Vlasenko [Fri, 13 Apr 2007 23:22:58 +0000 (23:22 -0000)]
dpkg: use nitfields which are a bit closer to typical ushort.
Code size -800.

17 years agostyle fixes
Denis Vlasenko [Fri, 13 Apr 2007 23:22:00 +0000 (23:22 -0000)]
style fixes

17 years agosourse_route_list -> source_route_list
Denis Vlasenko [Fri, 13 Apr 2007 22:07:21 +0000 (22:07 -0000)]
sourse_route_list -> source_route_list

17 years agomake xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)
Denis Vlasenko [Fri, 13 Apr 2007 21:26:20 +0000 (21:26 -0000)]
make xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)

17 years agohush: more style fixes.
Denis Vlasenko [Fri, 13 Apr 2007 19:56:56 +0000 (19:56 -0000)]
hush: more style fixes.

17 years agohush: comment out and replace bug in set_local_var:
Denis Vlasenko [Fri, 13 Apr 2007 19:55:50 +0000 (19:55 -0000)]
hush: comment out and replace bug in set_local_var:
-       if (value == 0 && ++value == 0) {
+       /*if (value == 0 && ++value == 0) ??? -vda */
+       if (value == NULL || value[1] == '\0') {

Style fixes.

17 years agoshell/: add SUSv3 doc for fast & easy reference
Denis Vlasenko [Fri, 13 Apr 2007 19:44:22 +0000 (19:44 -0000)]
shell/: add SUSv3 doc for fast & easy reference

17 years agofix typo in comment
Denis Vlasenko [Fri, 13 Apr 2007 16:32:26 +0000 (16:32 -0000)]
fix typo in comment

17 years agofind: add support for -delete, -path (by Natanael Copa)
Denis Vlasenko [Fri, 13 Apr 2007 10:00:12 +0000 (10:00 -0000)]
find: add support for -delete, -path (by Natanael Copa)

17 years agosed: fix escaped newlines in -f; fix multiple -f and -e
Denis Vlasenko [Thu, 12 Apr 2007 21:20:25 +0000 (21:20 -0000)]
sed: fix escaped newlines in -f; fix multiple -f and -e
(broke when getopt32 was fixed to not reverse the list)

17 years agologin: fixing my brainfart: xspawn(t_argv) <- was using argv!
Denis Vlasenko [Thu, 12 Apr 2007 20:33:01 +0000 (20:33 -0000)]
login: fixing my brainfart: xspawn(t_argv) <- was using argv!

17 years agomake sure we free the grep data as well
Mike Frysinger [Thu, 12 Apr 2007 18:29:27 +0000 (18:29 -0000)]
make sure we free the grep data as well

17 years agolash: "forking" applets are actually can be treated the same way as "non-forked".
Denis Vlasenko [Thu, 12 Apr 2007 17:10:45 +0000 (17:10 -0000)]
lash: "forking" applets are actually can be treated the same way as "non-forked".
Also save a bit of space on trailing NULL array elements.

17 years agofix realloc-of-non-malloced pointer, and reduce size while at it
Denis Vlasenko [Thu, 12 Apr 2007 17:08:53 +0000 (17:08 -0000)]
fix realloc-of-non-malloced pointer, and reduce size while at it

17 years agologin: remove setpgrp call (makes it work from shell prompt again).
Denis Vlasenko [Thu, 12 Apr 2007 12:31:02 +0000 (12:31 -0000)]
login: remove setpgrp call (makes it work from shell prompt again).
login: sanitize stdio descriptors (we are suid, need to be careful!)
shrink login and set_environment by ~100 bytes.

17 years agopass a copy of argv[i] to NOFORK applets (they may permute it etc).
Denis Vlasenko [Thu, 12 Apr 2007 12:27:32 +0000 (12:27 -0000)]
pass a copy of argv[i] to NOFORK applets (they may permute it etc).
set/save/restore more shared global variables whan call one applet from another

17 years ago- shrink iproute a bit (-200 bytes). Untested
Bernhard Reutner-Fischer [Thu, 12 Apr 2007 11:36:56 +0000 (11:36 -0000)]
- shrink iproute a bit (-200 bytes). Untested

17 years ago- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
Bernhard Reutner-Fischer [Thu, 12 Apr 2007 11:34:39 +0000 (11:34 -0000)]
- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
  -916 byte

17 years agostyle fixes. No code changes
Denis Vlasenko [Thu, 12 Apr 2007 00:32:05 +0000 (00:32 -0000)]
style fixes. No code changes

17 years agobb_full_fd_action: remove potential xmalloc from NOFORK path
Denis Vlasenko [Wed, 11 Apr 2007 23:20:53 +0000 (23:20 -0000)]
bb_full_fd_action: remove potential xmalloc from NOFORK path
cat: stop using stdio.h opens
libbb: introduce & use open[3]_or_warn
function                                             old     new   delta
open3_or_warn                                          -      54     +54
bb_cat                                               115     144     +29
open_or_warn                                           -      25     +25
unlzma                                              2404    2412      +8
chattr_main                                          334     339      +5
xstrtoul_range_sfx                                   251     255      +4
telnet_main                                         1514    1510      -4
static.opt                                             4       -      -4
qgravechar                                           122     118      -4
fuser_add_pid                                         61      54      -7
fuser_add_inode                                      154     147      -7
writeFileToTarball                                  1542    1534      -8
refresh                                             1156    1148      -8
do_show                                              856     846     -10
read_leases                                          212     200     -12
setup_redirects                                      236     222     -14
iproute_list_or_flush                               1582    1568     -14
read_config                                          427     411     -16
write_leases                                         284     264     -20
hash_file                                            338     318     -20
copy_file                                           1760    1740     -20
do_iproute                                          2610    2588     -22
bb_full_fd_action                                    320     269     -51
open_to_or_warn                                      103      49     -54
fuser_main                                          1660    1596     -64
.rodata                                           131160  131096     -64
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423)        Total: -298 bytes

17 years agoash: fix kill -l (by Mats Erik Andersson <mats.andersson64@comhem.se>)
Denis Vlasenko [Wed, 11 Apr 2007 20:43:31 +0000 (20:43 -0000)]
ash: fix kill -l (by Mats Erik Andersson <mats.andersson64@comhem.se>)

17 years agofix typo in doc
Denis Vlasenko [Wed, 11 Apr 2007 19:27:22 +0000 (19:27 -0000)]
fix typo in doc

17 years agostyle fixes, no code changes.
Denis Vlasenko [Wed, 11 Apr 2007 17:04:29 +0000 (17:04 -0000)]
style fixes, no code changes.

17 years agorename: run_applet_by_name -> run_applet_and_exit
Denis Vlasenko [Wed, 11 Apr 2007 17:03:19 +0000 (17:03 -0000)]
rename: run_applet_by_name -> run_applet_and_exit

17 years ago- set the scope properly. Thanks to Jean Wolter, who wrote:
Bernhard Reutner-Fischer [Wed, 11 Apr 2007 16:23:57 +0000 (16:23 -0000)]
- set the scope properly. Thanks to Jean Wolter, who wrote:
busybox ip and the original ip utility behave differently when setting
the following route (verified with ip route show using the original ip
utility):

   ip route add 10.0.0.138 dev eth0

Result for busybox ip:

       # ip route add 10.0.0.138 dev eth0
       # /usr/local/bin/ip route show
       10.0.0.138 dev eth0

Result for ip:

       # /usr/local/bin/ip route add 10.0.0.138 dev eth0
       #  /usr/local/bin/ip route show
       10.0.0.138 dev eth0  scope link

A following "ip route add default via 10.0.0.138" fails for busybox
ip, since the kernel can not find a route to 10.0.0.138 (it replies
with Network is unreachable).

The reasons seems to be that the original ip utility explicitly sets
the scope after parsing all parameters. This is missing in busybox,
the attached patch fixes this. I took this from the original iproute
sources and removed some variables, which are not needed for busybox.

17 years agoAdd NOFORK/NOEXEC documentation.
Denis Vlasenko [Wed, 11 Apr 2007 16:16:41 +0000 (16:16 -0000)]
Add NOFORK/NOEXEC documentation.

17 years agofix typo in comment
Denis Vlasenko [Wed, 11 Apr 2007 07:36:31 +0000 (07:36 -0000)]
fix typo in comment

17 years agofix misplaced #if
Denis Vlasenko [Wed, 11 Apr 2007 07:26:56 +0000 (07:26 -0000)]
fix misplaced #if

17 years agoadd more convenient defines for [NO]MMU:
Denis Vlasenko [Wed, 11 Apr 2007 07:04:23 +0000 (07:04 -0000)]
add more convenient defines for [NO]MMU:
"#ifndef BB_NOMMU" is a double negative

17 years agorandom NOMMU fixes. compressed --help really does work for NOMMU! /me happy
Denis Vlasenko [Tue, 10 Apr 2007 23:32:37 +0000 (23:32 -0000)]
random NOMMU fixes. compressed --help really does work for NOMMU! /me happy

17 years agoRename two config options:
Denis Vlasenko [Tue, 10 Apr 2007 23:03:30 +0000 (23:03 -0000)]
Rename two config options:
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes

17 years agoxargs: fix my brain fart (resulted in memory leak)
Denis Vlasenko [Tue, 10 Apr 2007 21:41:16 +0000 (21:41 -0000)]
xargs: fix my brain fart (resulted in memory leak)

17 years agomake compressed help code NOMMU- and NOFORK-friendly -
Denis Vlasenko [Tue, 10 Apr 2007 21:40:19 +0000 (21:40 -0000)]
make compressed help code NOMMU- and NOFORK-friendly -
no forking anymore, bunzip2 unpack routine now does all it in memory.

17 years agomake a few struct bb_applet members conditional
Denis Vlasenko [Tue, 10 Apr 2007 21:38:30 +0000 (21:38 -0000)]
make a few struct bb_applet members conditional
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig

17 years ago- mv ip*_main into ip.c; use a dispatcher to save on needless duplication.
Bernhard Reutner-Fischer [Tue, 10 Apr 2007 20:11:12 +0000 (20:11 -0000)]
- mv ip*_main into ip.c; use a dispatcher to save on needless duplication.
  Saves a minor 12b.

17 years ago- use enum for the OPs as suggested by vda. No obj-code changes.
Bernhard Reutner-Fischer [Tue, 10 Apr 2007 19:30:50 +0000 (19:30 -0000)]
- use enum for the OPs as suggested by vda. No obj-code changes.

17 years ago- forgot this hunk that corrects the usage text of ip
Bernhard Reutner-Fischer [Tue, 10 Apr 2007 19:00:08 +0000 (19:00 -0000)]
- forgot this hunk that corrects the usage text of ip

17 years ago- rewrite the ip applet to be less bloaty
Bernhard Reutner-Fischer [Tue, 10 Apr 2007 18:43:27 +0000 (18:43 -0000)]
- rewrite the ip applet to be less bloaty
- mark libiproute's matches() as deprecated. Convert to index_in_(sub)str_array()!
   text    data     bss     dec     hex filename
    314       0       0     314     13a ip.o.orig
    200       0       0     200      c8 ip.o
Using a smallint for the key would save another byte.

17 years ago- add ATTRIBUTE_DEPRECATED for functions that should be removed in the future.
Bernhard Reutner-Fischer [Tue, 10 Apr 2007 18:40:05 +0000 (18:40 -0000)]
- add ATTRIBUTE_DEPRECATED for functions that should be removed in the future.
  This is ment to provide means to point at cruft marked for cleanup.

17 years agoone-liner: fix indentation
Denis Vlasenko [Tue, 10 Apr 2007 17:18:12 +0000 (17:18 -0000)]
one-liner: fix indentation