Commit Graph

165 Commits

Author SHA1 Message Date
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
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
0ee3999d13 random tiny size savings 2006-12-24 15:23:28 +00:00
Bernhard Reutner-Fischer
b40bdb383a - add FIXME to brokenness in the installer.. 2006-11-22 18:40:06 +00:00
Denis Vlasenko
fcdb00f735 httpd: LC_TIME locale _must_ be POSIX to httpd! We speak over the net! 2006-11-21 00:09:37 +00:00
Denis Vlasenko
01c27fc5ac which: -84 bytes 2006-10-05 21:10:53 +00:00
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +00:00
Rob Landley
eb84a42fdd The Software Freedom Law Center wants us to add a copyright notice to the
generated binaries, to make copyright enforcement easier.  Our liason with
them (Bradley Kuhn) suggested the following text:

> Copyright (C) YEAR-2006  Erik Andersen, Rob Landley, and others.
> Licensed under GPLv2.  See source distribution for full notice.

And the busybox help message seems the least offensive place to put it.  (At
some point in the future, I need to strip 128 bytes from the binary to feel
good about this, though. :)

Minor header file cleanup while I was there, since libbb.h already #includes
most of that stuff...
2006-09-20 21:41:13 +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
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
9fb272a222 Dennis Vlasenko pointed out that run_applet_by_name sets bb_applet_name already. 2006-05-07 01:44:23 +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
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"
74078685e6 busybox.c: ENABLE_LOCALE logic correct. 2005-09-29 08:19:04 +00:00
"Vladimir N. Oleynik"
10a1fe6169 remove infinity loop ./busybox --help busybox 2005-09-05 11:25:27 +00:00
Rob Landley
8a7a678b03 Fixes so "make allnoconfig" works again.
The configure system's save function edited out sub-menus that wouldn't be
displayed in the current configuration, meaning config.h wouldn't have #udef
entries for those symbols, meaning bb_config.h would have the relevant
ENABLE_ missing instead of defined to 0.  This broke the build.

So I fixed it, and then reorganized the applets.c and busybox.c to take
away the warnings this revealed (code that would be optimized out was making
calls to functions that hadn't been prototyped.  So I added an #else case
to those #ifdefs to #define the relevant functions to empty macros to
placate the warnings.

I also reorganized the applets.c code to make adding such an #else case less
of a pain (and make the need for prototyping go away by moving the functions
up before they were used, and generally wind up with fewer #ifdefs in
the code by putting all the logic in one place).  This resulted in a huge
seeming patch, when most if it just moves code from one place to another
without touching it...

Upside: make allyesconfig and make allnoconfig should both work now.
2005-09-05 04:13:33 +00:00
Rob Landley
b766c39456 General cleanup of command line parsing to allow "busybox" to work as a prefix.
(I.E. any argv[0] that starts with "busybox" winds up in busybox_main().)

Added testing/busybox.tests which tests the following permutations:

./busybox
./busybox-suffix
./busybox cat
./busybox-suffix cat
./busybox --help
./busybox-suffix --help
./busybox --help cat
./busybox-suffix --help cat
./busybox --help unknown
./busybox-suffix --help unknown
./unknown

Also repair the test suite so ./runtest calls the ".tests" scripts properly.

Note: you can now go "busybox busybox busbox ls -l" and it'll take it.  The
new code is pretty generic.  I can block that if anybody can come up with a
good reason to...
2005-09-04 11:10:37 +00:00
Mike Frysinger
2c12d435e5 output busybox help to stdout, not stderr 2005-04-22 02:19:01 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Tim Riker
b1ffba0401 wrap bb help output if CONFIG_FEATURE_AUTOWIDTH 2003-11-07 19:37:20 +00:00
Glenn L McGrath
fd7bc13557 Woops, the previous patch reversal wasnt complete, breaking everything. 2003-10-04 00:05:47 +00:00
Glenn L McGrath
f86bd9f2cd Reverse my previous changes and make a note about why its dont this way 2003-10-03 13:21:10 +00:00
Glenn L McGrath
4a77c781ef argc has already been decremented 2003-10-03 07:51:30 +00:00
Glenn L McGrath
cb920d9778 Patch from Rob Landley, Simplify organisation of arguments. 2003-10-03 03:25:30 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
fcffa2cc1a Apply lash_patch35 from vodz, which brings several nice size_optimizations. 2002-04-06 05:17:57 +00:00
Eric Andersen
fb74a45088 Vodz' last_patch31
Very minimal last corrections:

    1) busybox.c: fix warining
    2) docs/: add applets for list from pwd_grp
    3) usage.h: add -n option for route
    4) run_parts.c: many todo fix for busybox style
    5) addgroup.c: add #ifdef CONFIG_FEATURE_SHADOWPASSWDS, reduce one
    perror_msg
    6) adduser.c: fix bug "variable i not initialize" and
       add #ifdef CONFIG_FEATURE_SHADOWPASSWDS
2001-12-18 14:06:03 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Matt Kraai
449377aa6a Fix invocation of `-/bin/sh' (bug #1209). 2001-08-27 15:02:32 +00:00
Eric Andersen
fa2661f2e5 Per a suggestion from Tom Oehser, fix up the leading-hyphen hack to
make it general.  Now all leading single hyphens are ignored for
purposed of applet name matching, while argv[0] is still passed
unaltered to applets, so leading-hyphen sensitive applets (such as sh)
can react accordingly.
 -Erik
2001-06-21 04:56:24 +00:00
Eric Andersen
77d9268892 Patch from larry to fix some grammar errors. 2001-05-23 20:32:09 +00:00
Eric Andersen
4819c3d477 Make the locale stuff only do the getpid==1 check if BB_INIT is defined 2001-05-13 00:33:16 +00:00
Eric Andersen
28355a36da Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,
make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
 -Erik
2001-05-07 17:48:28 +00:00
Mark Whitley
8a633268ef Made new xreadlink function for libbb and changed applets to use it instead of
readlink(2).
2001-04-30 18:17:00 +00:00
Eric Andersen
04095e58fb Move messages.c to libbb. Make each string in messages.c be its own .o file.
This way, we can new get rid of all that tedious #define rubbish we used to
need to enable specific messages.  This way is enormously simpler, and as a
bonus also ends up saving us 96 bytes.
 -Erik
2001-04-25 05:39:18 +00:00
Eric Andersen
e5dfced23a Apply Vladimir's latest cleanup patch.
-Erik
2001-04-09 22:48:12 +00:00
Eric Andersen
0f0c0b41ce Make 'busybox --help' work as expected, closing bug #1139
-Erik
2001-04-03 17:05:01 +00:00
Eric Andersen
ba372620c2 Force applet_name to be "sh" when command prefaced by "-" 2001-03-20 17:39:53 +00:00
Eric Andersen
2ccfef2004 Patch from Vladimir to move struct applet from busybox.c to applets.c,
which looks like the right place for such things to live.
2001-03-19 19:30:24 +00:00
Mark Whitley
016771834a Changed exit code from -1 to 0 when busybox is invoked with no args.
(Closes bug #1114.)
2001-03-02 17:47:17 +00:00
Eric Andersen
cbe31dace5 It turns out that DODMALLOC was broken when I reorganized busybox.h
header file usage before the 0.49 release.  To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
 -Erik
2001-02-20 06:14:08 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Matt Kraai
f2cc2762bb Create find_applet_by_name function. Save 32 bytes. 2001-02-01 19:21:20 +00:00
Matt Kraai
dd19c69904 Removed trailing \n from error_msg{,_and_die} messages. 2001-01-31 19:00:21 +00:00
Eric Andersen
90ca2848fd Fix some formatting 2001-01-27 08:32:57 +00:00
Eric Andersen
ed3ef50c23 Fix header file usage -- there were many unnecessary header files included in
busybox.h which slowed compiles.  I left only what was needed and then fixed up
all the apps to include their own header files.  I also fixed naming for pwd.h
and grp.h functions.  Tested to compile and run with libc5, glibc, and uClibc.
 -Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
f5d5e77321 more bugs fixed -- found doing regression testing
-Erik
2001-01-24 23:34:48 +00:00
Matt Kraai
1fa1adea2a Change calls to error_msg.* and strerror to use perror_msg.*. 2000-12-18 03:57:16 +00:00