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
4500c58a07
make "static linking against glibc" an #error, not #warning
2007-05-18 07:37:06 +00:00
Denis Vlasenko
3349fc4da9
applets: fix compile-time warning
2007-05-04 14:54:36 +00:00
Denis Vlasenko
3bc18253b0
fix suid config handling
2007-05-02 23:01:32 +00:00
Denis Vlasenko
2ace1e3f07
make "busybox" w/o args work again, and save 10 bytes in the process.
2007-04-18 21:00:21 +00:00
Denis Vlasenko
17e3c34aa7
applet.c: ruid is needed only if FEATURE_SUID=y
2007-04-16 20:55:27 +00:00
Bernhard Reutner-Fischer
bc9d7d788b
- we unconditionally need ruid. Fixes build error in line 334
2007-04-16 18:25:46 +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
f5294e1f4c
hush: use NOFORK applets as appropriate. Net reduction of code size.
2007-04-14 10:09:57 +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
473dae080a
add more convenient defines for [NO]MMU:
...
"#ifndef BB_NOMMU" is a double negative
2007-04-11 07:04:23 +00:00
Denis Vlasenko
f1a7141cfc
random NOMMU fixes. compressed --help really does work for NOMMU! /me happy
2007-04-10 23:32:37 +00:00
Denis Vlasenko
c6758a07c6
make compressed help code NOMMU- and NOFORK-friendly -
...
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-04-10 21:40:19 +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
Bernhard Reutner-Fischer
163516da3a
- very minor shrinkage (-3b)
2007-04-10 14:16:19 +00:00
Denis Vlasenko
3f3aa2a57d
make xfunctions optionally longjump instead of exit.
...
use it for making NOFORK more practical.
touch: make it a NOFORK applet
2007-04-09 21:35:07 +00:00
Denis Vlasenko
2dfdd44d9d
busybox: fix "<applet>: applet not found" message
2007-04-09 03:29:43 +00:00
Denis Vlasenko
c44ab01b75
Improve STANDALONE_SHELL. "safe" applets are renamed NOEXEC applets
...
and now this fact is recorded in applets.h, not ash.c.
Several fixes to "--help + STANDALONE_SHELL" scenarios.
function old new delta
run_current_applet_and_exit - 355 +355
arith 2064 2073 +9
refresh 1148 1156 +8
getopt32 1068 1073 +5
telnet_main 1510 1514 +4
md5_sha1_sum_main 565 566 +1
xstrtoul_range_sfx 255 251 -4
packed_usage 22523 22514 -9
tryexec 255 203 -52
static.safe_applets 152 - -152
.rodata 131320 131128 -192
run_applet_by_name 869 506 -363
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/5 up/down: 382/-772) Total: -390 bytes
./busybox ash -c 'i=20000; while test $i != 0; do touch z; i=$((i-1)); done'
runs more than twice as fast with STANDALONE_SHELL versus without.
2007-04-09 03:11:58 +00:00
Denis Vlasenko
32b633aa3f
merge busybox.c into applets.c
2007-04-09 03:05:48 +00:00
Denis Vlasenko
1b6fa4c57c
applets.c, xfunc.c: style cleanup
2007-03-24 12:08:36 +00:00
Denis Vlasenko
baca175912
kill superfluous returns at the end of void functions
2007-03-11 13:43:10 +00:00
Denis Vlasenko
c7ba8b9d6c
do not put all <applet>_main() declarations
...
in busybox.h - this produces false dependencies
2007-02-03 17:27:14 +00:00
Denis Vlasenko
a41fdf331a
preparatory patch for -Wwrite-strings #1
2007-01-29 22:51:00 +00:00
Denis Vlasenko
218f2f4882
accumulated post-1.4.0 fixes
2007-01-24 22:02:01 +00:00
Denis Vlasenko
0ee3999d13
random tiny size savings
2006-12-24 15:23:28 +00:00
Denis Vlasenko
83e5d6f772
A bunch of defined(__GLIBC__) added. static-linking warning expanded
2006-12-18 21:49:06 +00:00
Denis Vlasenko
067e3f031a
wget: fix error message.
...
Bad:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
: HTTP/1.0 404 Not Foundror 404 Not Found
Good:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
get: server returned error: HTTP/1.0 404 Not Found
nslookup: fix my mistake
applets: make Bernhard Fischer <rep.nop@aon.at> happy :)
2006-11-10 23:25:53 +00:00
Denis Vlasenko
07159f0f0e
add && !defined(__UCLIBC__) to static link warning check
2006-11-09 00:00:12 +00:00
Denis Vlasenko
9225854144
mostly style fixes
2006-11-01 10:25:35 +00:00
Denis Vlasenko
afea46b4e4
"#warning: http://...." doesn't work (gcc thinks that it's a comment!)
2006-10-29 19:37:13 +00:00
Denis Vlasenko
7c4503d223
__GLIBC__ -> defined(__GLIBC__)
2006-10-23 00:42:24 +00:00
Denis Vlasenko
df51892690
Added compile-time warning for STATIC+GLIBC build
2006-10-20 13:42:57 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
13c5a6832f
mount: support user mounts if CONFIG_DESKTOP
2006-10-16 22:39:51 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
7d219aab70
build system overhaul
2006-10-05 10:17:08 +00:00
Denis Vlasenko
8f8f268cfd
bb_applet_name -> applet_name
2006-10-03 21:00:43 +00:00
Denis Vlasenko
40920825d5
rename bb_default_error_retval -> xfunc_error_retval
2006-10-03 20:28:06 +00:00
Denis Vlasenko
01a74f9649
applets.c: fix indentation
2006-09-23 16:34:39 +00:00
Rob Landley
e1a0f5372f
Unbreak allbareconfig. (Todo item: rewrite dependency checker. Yeah, I
...
already have that one, but it moves up the list...)
2006-07-26 15:38:46 +00:00
Rob Landley
534374755d
Cleaup read() and write() variants, plus a couple of new functions like
...
xlseek and fdlength() for the new mkswap.
2006-07-16 08:14:35 +00:00
Rob Landley
ea224be6aa
skip_whitespace() shouldn't claim its return value is const, it doesn't know
...
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +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
Rob Landley
1801e9cde7
Rich Felker writes:
...
mistake in a macro caused statement before declaration.
2006-05-03 20:19:14 +00:00
Rob Landley
73f54702bc
Fixup a build break if ENABLE_SHOW_USAGE switched off. (Fallout from the
...
compressed usage messages patch).
2006-05-01 00:53:40 +00:00
Rob Landley
7e21d5f6b1
Patch from Dennis Vlasenko to add the option to compress help text.
2006-04-27 23:34:46 +00:00
Bernhard Reutner-Fischer
81901a096c
- add option to suppress the terse usage messages. Saves 6.8k for defconfig:
...
text data bss dec hex filename
861791 11264 1039140 1912195 1d2d83 busybox.have-terse-usage
854799 11264 1039140 1905203 1d1233 busybox.no-terse
2006-03-31 18:43:55 +00:00
Bernhard Reutner-Fischer
e0fe937593
- correct typo
2006-03-23 16:52:59 +00:00