Denis Vlasenko
2b54aaa9bf
msh: fix obscure case with backticks and closed fd 1
2007-05-09 22:16:08 +00:00
Denis Vlasenko
7d4c44e1b1
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
2007-04-16 22:34:39 +00:00
Denis Vlasenko
e471275813
msh: style fixes
...
shell/README - a place to record things about busybox shells
2007-04-14 15:08:41 +00:00
Denis Vlasenko
5f9468e996
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.
2007-04-14 13:22:09 +00:00
Denis Vlasenko
831a20f512
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
2007-04-12 12:27:32 +00:00
Denis Vlasenko
51742f4bb0
style fixes. No code changes
2007-04-12 00:32:05 +00:00
Denis Vlasenko
e4f2d064b0
rename: run_applet_by_name -> run_applet_and_exit
2007-04-11 17:03:19 +00:00
Denis Vlasenko
80d14beae9
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
2007-04-10 23:03:30 +00:00
Denis Vlasenko
335b63d8d1
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
2007-04-10 21:38:30 +00:00
Denis Vlasenko
95cb3263ae
msh: smallish code shrinkage; cosmetics
2007-04-09 03:06:34 +00:00
Denis Vlasenko
10457b90db
make pidfile writing configurable.
...
[ui]toa_to_buf: change API. No users yet.
2007-03-27 22:01:31 +00:00
Denis Vlasenko
55f30b05ac
inetd,ed,msh: data/bss reduction (in mss, more than 9k of it)
2007-03-24 22:42:29 +00:00
Denis Vlasenko
5b27fbe990
dc: use common_bufsiz1 for evaluation stack
...
msh: fix "underscore bug" (a_b=1111 didn't work)
dnsd: openlog(), so that applet's name is logged
2007-03-24 14:06:51 +00:00
Denis Vlasenko
c86e052b81
fix accumulated whitespace and indentation damage
2007-03-20 11:30:28 +00:00
Mike Frysinger
67a32adbca
add STANDALONE support
2007-03-09 08:25:24 +00:00
Denis Vlasenko
8e858e2700
clean up accumulated whitespace damage
2007-03-07 09:35:43 +00:00
Denis Vlasenko
d244c5eaf8
msh: fix my buglet
2007-02-09 17:30:14 +00:00
Denis Vlasenko
cf787cf3a5
find: support for !
2007-02-04 17:11:25 +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
1e3b068689
msh: cleaning up for -Wwrite-strings part #4
2007-02-01 01:43:54 +00:00
Denis Vlasenko
6b50f73171
msh: cleaning up for -Wwrite-strings part #3
2007-02-01 01:43:39 +00:00
Denis Vlasenko
489f93ebae
msh: cleaning up for -Wwrite-strings part #2
2007-02-01 01:43:16 +00:00
Denis Vlasenko
00ccf95bc8
msh: cleaning up for -Wwrite-strings
2007-02-01 01:39:24 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
38f6319421
cmdedit is not a 'command' editing anymore, it's just editing (generic),
...
so rename stuff accordingly.
2007-01-22 09:03:07 +00:00
Denis Vlasenko
8e1c71529c
Convert cmdedit into more generic line input facility
...
(make history and completion optional at runtime).
Use it for fdisk, as an example.
Some unrelated fixes in fdisk are also here.
2007-01-22 07:21:38 +00:00
Denis Vlasenko
b2abef3e54
stty: fix width of a field for ppc32
...
sort: fix -u to match coreutils 6.3
msh: compile fix (my fault)
2007-01-01 18:18:04 +00:00
Denis Vlasenko
e27f15615f
msh: double "static char line[LINELIM]" etc deleted.
...
massive amounts of assignments-in-ifs deleted
(some of which were VERY nasty)
2007-01-01 06:00:38 +00:00
Denis Vlasenko
0ee3999d13
random tiny size savings
2006-12-24 15:23:28 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
d9e15f2068
style cleanup: return(a) -> return a, part 2
2006-11-27 16:49:55 +00:00
Denis Vlasenko
079f8afa0a
style cleanup: return(a) -> return a, part 1
2006-11-27 16:49:31 +00:00
Denis Vlasenko
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Mike Frysinger
3672fe9e91
remove duplicate flag decls
2006-11-15 21:52:10 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +00:00
Denis Vlasenko
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +00:00
Rob Landley
a299efb7b0
Make a warning go away when standalone shell is disabled.
2006-08-10 21:46:43 +00:00
Rob Landley
c9c1a41c58
A couple things that got tangled up in my tree, easier to check in both than
...
untangle them:
Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them). (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)
Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
"Robert P. J. Day"
177c9f3128
Get rid of all "#if 0" content.
2006-07-01 14:30:28 +00:00
"Robert P. J. Day"
68229837ff
Remove all usage of the "register" storage class specifier.
2006-07-01 13:08:46 +00:00
Mike Frysinger
42705abc28
dont setpgrp() for now as it breaks system() and that is more important than ctrl+c handling of background processes
2006-06-26 20:42:36 +00:00
Bernhard Reutner-Fischer
f087798e8b
- convert old-style parameter declarations (K&R) to modern style.
2006-06-25 22:08:53 +00:00
Mike Frysinger
14ff19b28a
assign default debug level to the MSHDEBUG define
2006-06-20 20:37:01 +00:00
Rob Landley
a34b48abe5
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
2006-06-14 01:27:01 +00:00
Mike Frysinger
2a13175440
make the default prompt suck less when using fancy prompts
2006-06-06 06:26:12 +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
Mike Frysinger
3132e9d830
use xmalloc()
2006-06-02 06:30:30 +00:00
Bernhard Reutner-Fischer
b180e5a766
- use portability wrapper define bb_setpgrp.
2006-05-26 14:24:56 +00:00
Mike Frysinger
1781188a9d
didnt mean to commit debug enable
2006-05-05 20:33:07 +00:00
Mike Frysinger
02d8fa48ad
use %p when printing pointers, not %x
2006-05-05 20:32:31 +00:00