Rob Landley
02add9e53a
Might as well commit this to have the history. It's not linked in to the
...
applet list yet (and won't be until it can replace lash, I'm not having five
shells in menuconfig at once), but you can build it with scripts/individual
and mostly this is checked in so I can bloatcheck future versions against it
easily....
This is about as small as a shell can get and still be a shell.
2006-09-05 03:22:19 +00:00
Rob Landley
88621d7398
Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damage
...
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan
to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-29 19:41:06 +00:00
Bernhard Reutner-Fischer
d591a360d3
- merge -r15463:15564 from busybox_scratch branch through these changesets:
...
------------------------------------------------------------------------
r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines
- use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert.
- use xchdir() since all is invain if it fails there anyways, supposedly
------------------------------------------------------------------------
r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines
- adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account.
------------------------------------------------------------------------
r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines
- partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save
s 144 bytes
text data bss dec hex filename
862434 10156 645924 1518514 172bb2 busybox.old
862322 10156 645892 1518370 172b22 busybox
function old new delta
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
new_text 70 60 -10
ipaddr_list_link 33 23 -10
gzip_main 898 822 -76
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120) Total: -120 bytes
------------------------------------------------------------------------
r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines
- remove useless global exports
function old new delta
rpm_main 940 1601 +661
rpm_getstring 107 112 +5
rpm_getint 148 153 +5
loop_through_files 103 106 +3
fileaction_dobackup 115 113 -2
fileaction_list 5 - -5
rpm_getcount 42 - -42
extract_cpio_gz 161 - -161
rpm_gettags 504 - -504
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714) Total: -40 bytes
text data bss dec hex filename
862322 10156 645892 1518370 172b22 busybox.old
862290 10156 645892 1518338 172b02 busybox
------------------------------------------------------------------------
r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines
- shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s
emaphore stuff into single caller manually.
stats:
function old new delta
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
small 1 - -1
local_logging 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
syslogd_main 1299 1285 -14
static.res 36 16 -20
.rodata 186650 186586 -64
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136) Total: -1088 bytes
cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,}
text data bss dec hex filename
3723 348 5242 9313 2461 sysklogd/syslogd.o.orig
3697 348 4188 8233 2029 sysklogd/syslogd.o
==============================================================================
Overall bloatcheck for the changeset mentioned above:
function old new delta
rpm_main 953 1608 +655
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
rpm_getstring 107 110 +3
rpm_getint 148 151 +3
loop_through_files 103 104 +1
small 1 - -1
fileaction_dobackup 115 113 -2
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
local_logging 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
fileaction_list 5 - -5
new_text 70 60 -10
ipaddr_list_link 33 23 -10
clear_bufs 31 21 -10
syslogd_main 1287 1273 -14
builtin_help 190 176 -14
static.res 36 16 -20
builtin_source 229 199 -30
rpm_getcount 42 - -42
gzip_main 842 786 -56
.rodata 227176 227112 -64
lash_main 609 527 -82
busy_loop 3883 3739 -144
extract_cpio_gz 155 - -155
rpm_gettags 501 - -501
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221) Total: -1511 bytes
2006-08-20 17:35:13 +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
081e38483e
Remove xcalloc() and convert its callers to xzalloc(). About half of them
...
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +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
53702e53ba
Replace the previous checkin with the correct fix.
2006-07-19 21:43:53 +00:00
"Robert P. J. Day"
3e4da920bd
For now, get around the error that "child" might be uninitialized.
2006-07-18 12:05:43 +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
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
Rob Landley
acf448d4f6
Bugfix from Shaun Jackman (check that argv[optind] isn't null before
...
dereferencing it) plus a bunch of tweaks from me.
2006-07-09 17:03:07 +00:00
Rob Landley
f296f0b77d
Bug fix from Vladimir Oleynic via Paul Fox for:
...
echo "+bond0" > /sys/class/net/bonding_masters
while true; do
echo hello
done
2006-07-06 01:09:21 +00:00
"Robert P. J. Day"
4eddb42bbc
Remove the silly redundancy from that header file include.
2006-07-03 00:46:47 +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
Rob Landley
7a8e491dff
Patch from Shaun Jackman moving the var=value logic to here it can do some good.
2006-07-01 17:19:02 +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
"Robert P. J. Day"
f350160963
Remove "#if 1" directives.
2006-07-01 12:19:39 +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
Bernhard Reutner-Fischer
35492137f8
- add note about strict ordering
2006-06-21 18:19:53 +00:00
Mike Frysinger
c2ad4f5d27
Jean Wolter writes: ash uses bsearch to search in the list of built-in commands, therefore the list of built-in commands has to be ordered. Revision 15077 introduced the source built-in and destroyed this order. And now ash doesn't find the shift command anymore.
2006-06-21 18:04:49 +00:00
Rob Landley
5483de1cb7
Cleanup patch from Shaun Jackman converting %m to perror.
2006-06-20 21:35:26 +00:00
Mike Frysinger
14ff19b28a
assign default debug level to the MSHDEBUG define
2006-06-20 20:37:01 +00:00
Rob Landley
7a260f01ce
Make some 64 bit warnings go away on x86-64.
2006-06-19 03:20:03 +00:00
Rob Landley
a34b48abe5
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
2006-06-14 01:27:01 +00:00
Rob Landley
68286770b6
Patch from Shaun Jackman to detect "name=value" variable assignments. Random
...
cleanup at the end by me to make some unrelated #ifdefs go away...
2006-06-13 19:01:30 +00:00
Rob Landley
f946379599
Make lash smaller. (Use llist_t for file closing, and different allocation
...
functions.)
2006-06-13 18:50:20 +00:00
Paul Fox
7ba12c6957
remove leading "Enable" from the config option text. not only is it
...
redundant, but it made the menuconfig shortcut mechanism mostly
useless, since so many of the entries started with 'E'.
2006-06-08 21:48:47 +00:00
Paul Fox
6ab037872f
made "test" an ash built-in.
...
moved the contents of libbb/bb_echo.c back into coreutils/echo.c,
which is a more reasonable place for them than libbb. this
forces anyone who wants echo and test to be builtin to ash to
also have them available as applets. their cost is very small,
and the number of people who wouldn't want them as applets is
also very small.
added warning about shell builtins vs. CONFIG_FEATURE_SH_STANDALONE_SHELL,
which conflicts with their use.
thanks to nathanael copa for debugging help.
some string size optimization in test.c may have been lost with
this commit, but this is a good new baseline.
2006-06-08 21:37:26 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +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
62558765b9
2006-06-02 Shaun Jackman <sjackman@gmail.com>
...
* shell/lash.c (pseudo_exec) [_NEWLIB_VERSION]: Remove the
__getopt_initialized hackery.
2006-06-03 10:28:25 +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
Rob Landley
299a6b4d7b
Consolidate #include <sys/time.h> so libbb.h does it.
2006-05-27 21:42:58 +00:00
Bernhard Reutner-Fischer
b180e5a766
- use portability wrapper define bb_setpgrp.
2006-05-26 14:24:56 +00:00
Bernhard Reutner-Fischer
0a8812bdc5
- replace _PATH_DEVNULL with bb_dev_null
2006-05-19 13:12:21 +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
47b1838957
Patch from Lucas C. Villa Real adding "source" as a synonym for the "." command.
2006-05-12 20:44:16 +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
Mike Frysinger
4e512f1062
fix Bug 659 as reported by Robin Getz
2006-05-05 18:38:07 +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
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Rob Landley
bc68cd14cc
Patch from Denis Vlasenko turning static const int (which gets emitted into
...
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Bernhard Reutner-Fischer
07a79e75f5
- backout using features which are not available with the previous stable
...
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Paul Fox
0f2dd9f4eb
vi-mode changes: eliminate warnings from out-of-range-for-type
...
case labels that are emitted by gcc4. rearrange macros to
eliminate these extra case labels entirely (since the optimizer
may no longer do it for us). eliminate static BUFSIZ character
deletion buffer -- malloc it, and make it much much smaller.
2006-03-07 20:26:11 +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
Rob Landley
06ec8cff83
Typo fixes brought to you by the letters a, l, and Robert P. Day.
2006-03-03 19:02:50 +00:00
Bernhard Reutner-Fischer
022eb311d5
- use absolute path for top_builddir and top_srcdir.
...
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e
- fixes parallel builds (make -j)
...
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
75cc0cace3
I was playing around with a dependency generator a couple weeks ago and I found
...
some #include files that aren't in the tree. No biggie...
2006-02-24 03:15:34 +00:00
Rob Landley
d6e14d8bee
Don't build directory libraries unless we're building an applet that needs it.
...
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b
moved BB_BANNER to applets/version.c file: make kernel like version,
...
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
Rob Landley
32251b4825
Convert some help text to english.
2006-02-08 18:34:21 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
4ccd2b4697
quick analize signed->unsigned: protect overflow of map[char], getchar->EOF. Use ATTRIBUTE_UNUSE.
2006-01-31 09:27:48 +00:00
Eric Andersen
a68ea1cb93
fix up yet more annoying signed/unsigned and mixed type errors
2006-01-30 22:48:39 +00:00
Rob Landley
49576c0018
Note on SVN 13424: Don't mix "default y" and select of something earlier
...
in the menu hierarchy or else make allnoconfig winds up leaving whatever the
select points to as "y". (In this case, "make allnoconfig" is leaving
CONFIG_TEST as "y".)
2006-01-30 06:11:42 +00:00
"Vladimir N. Oleynik"
84005af7ef
C99 say: "char" declaration may be signed or unsigned default
2006-01-25 17:53:04 +00:00
"Vladimir N. Oleynik"
fdb871c498
Add more bash-like dot-dirs cmdedit feature
...
Close bug 648.
Restore my whitespace
2006-01-25 11:53:47 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b
- add platform.h.
...
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
96002bba67
- cleanup Config.in. Use "select CONFIG_FOO" and add the corresponding
...
"depends on CONFIG_BAR" instead of the if !CONFIG_FOO ...default y stanza.
2006-01-19 14:42:23 +00:00
"Vladimir N. Oleynik"
cfc8f59649
restore 8-bit syntax works, last debian patch is broken. Noticed by Vladimir Dronnikov
2006-01-19 11:23:34 +00:00
"Vladimir N. Oleynik"
fb29b46201
sync with dash_0.5.3-1
2006-01-15 14:21:01 +00:00
Bernhard Reutner-Fischer
7ca61b6f33
- shared libbusybox.
...
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
"Vladimir N. Oleynik"
ddc280ec43
sync license from mainstream
2005-12-15 12:01:49 +00:00
"Vladimir N. Oleynik"
e6d88ea2a1
remove sigsetmask, noticed by Bernhard
2005-12-13 13:24:23 +00:00
Rob Landley
032e2cbf20
Uninitialized variable causing intermittent syntax errors (bug 449).
2005-12-12 06:52:45 +00:00
"Vladimir N. Oleynik"
485d7cbdf1
data --> text
2005-10-17 09:48:57 +00:00
"Vladimir N. Oleynik"
6f347ef9dc
common BUFSIZ BSS buffer, small reduce code, data and bss
2005-10-15 10:23:55 +00:00
"Vladimir N. Oleynik"
6c35c7c976
usage bb_dev_null
2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
39a841cecf
change interface to bb_xasprintf() - more perfect for me.
...
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
"Vladimir N. Oleynik"
11d7c52912
correct set prompt if CONFIG_ASH_EXPAND_PRMT enabled, small automatic space->tabs convert by my personal editor
2005-09-26 13:24:45 +00:00
Mike Frysinger
62f18e1f20
use the shorter license header
2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5
use brief license line
2005-09-24 06:01:57 +00:00
Mike Frysinger
9ac178ab40
rename menu and touchup whitespace
2005-09-24 05:49:36 +00:00
"Vladimir N. Oleynik"
ac9731704a
Reduce exported from msh applet
2005-09-22 14:38:17 +00:00
"Vladimir N. Oleynik"
264e771b8b
Reduce exported from lash applet
2005-09-22 14:35:29 +00:00
"Vladimir N. Oleynik"
19c370167a
Reduce exported from hush applet
2005-09-22 14:33:15 +00:00
"Vladimir N. Oleynik"
e4baaa2d27
more remove lost exported
2005-09-22 12:59:26 +00:00
Paul Fox
02eb934b0f
committing:
...
Summary 0000242: ash: read -t broken
this also implements -n and -s options to read. (they're configured
together because most of their code is in common, and separating them
seemed silly.
2005-09-07 16:56:02 +00:00
"Vladimir N. Oleynik"
f087480da1
destroy bug [0000404]
2005-09-05 15:46:26 +00:00
"Vladimir N. Oleynik"
bef14d7a87
1) sync with dash_0.5.2-7
...
2) but expand PS# as config option
3) correct kill error message again
4) remove show "line number" for interactive run (patch pending for dash)
2005-09-05 13:25:11 +00:00
Rob Landley
23246f39ed
Patch from Stephane Billiart to improve ash error message.
2005-08-14 19:16:51 +00:00
Paul Fox
0b62158475
implemented a builtin echo command in ash. moved the guts of the
...
echo applet into libbb, and now call bb_echo() from both echo.c
and ash.c
2005-08-09 19:38:05 +00:00
Paul Fox
3f11b1bf63
commiting:
...
0000025: vi-editing mode for ash
2005-08-04 19:04:46 +00:00
Mike Frysinger
4d00896d05
use toplevel ARFLAGS and update default ARFLAGS to be quiet
2005-07-27 01:09:24 +00:00
Paul Fox
8de331def0
revert 10881, and refix by changing "if (vallen)" to "if (val)". this
...
is per the upstream fix for dash, in dash_0.5.2-6.diff. thanks vodz, for
catching this.
2005-07-21 12:03:05 +00:00
Paul Fox
6f267f022f
applying fix for:
...
0000261: Unsafe empty env var export in ash
2005-07-20 19:18:45 +00:00
Paul Fox
54690dc0b2
applyinf fix for:
...
0000155: variable expansion with braces in backticks in msh
2005-07-20 18:33:12 +00:00
Paul Fox
c3850c83d9
applying fix from:
...
0000152: ash: quoting rules for local variables different to globals
2005-07-20 18:23:39 +00:00
Paul Fox
574fee4f99
applying:
...
0000054: Tab completing filenames in ash causes SEGV
Simple tab completion operations cause busybox (ash) to
access illegal addresses.
2005-07-19 20:41:06 +00:00
Rob Landley
0fcd9430ce
This one's from me. Fix ash "standalone shell".
...
If we exec /proc/self/exe and only fall back to /bin/busybox if /proc isn't
there, then we have a reasonable chance of having the standalone shell work
even if busybox isn't installed in /bin on the system in question.
Still won't work in a chroot environment, but it's an improvement.
2005-05-07 08:27:34 +00:00
Mike Frysinger
dcc40b7ecc
Shaun Jackman writes: Newlib uses both __getopt_initialized and optind to track initialization of getopt()
2005-03-04 01:33:17 +00:00
Ned Ludd
d1e3cbdb5a
- no need to check if JOBS is defined. Config.in ensures it.
2005-02-10 00:44:31 +00:00
Ned Ludd
2123b7cded
- add ash read -t timeout support. initial code provided by Tim Yamin on Oct/21/2004 on the busybox mailing list. Edited his code a little to keep syntax highlighers happy and make it optional when CONFIG_ASH_TIMEOUT is defined
2005-02-09 21:07:23 +00:00
Eric Andersen
ad63cb2514
Fix CONFIG_ASH_MATH_SUPPORT_64 so it actually works
2004-10-08 09:43:34 +00:00