Commit Graph

4662 Commits

Author SHA1 Message Date
Rob Landley
90ca6b2878 This code exists to compensate for ancient broken build environments which,
as far as I can tell, are no longer relevant.  Modern busybox refuses to
build under libc5 (there's a specific test and #error for that), and
I'm not sure building against 2.1 kernel headers on Alpha was ever relevant.

I'm happy to put any of this back if anybody can point to a real need for it,
but if so we need to specifically document what environment is being
compensated for.  (And we should quarrantine the build environment code
into one place, anyway.  Maybe "quirks.h" for known compiler and
libc quirks?)
2005-09-07 06:39:02 +00:00
Rob Landley
14efdc58ce Don't comment warnings. Don't put #warnings about warnings. _FIX_ warnings.
This fixes the warning, and makes the binary smaller out of sheer pique.
(Yes, since Manuel did this one it's nice tight code that took several
attempts to shrink, but I was ticked.)

Add the start of a test for uniq; this is about the first 1/3 of the
tests we need for full susv3 coverage of uniq.
2005-09-07 04:18:36 +00:00
Mike Frysinger
99f61719cb Amir Shalem writes:
this patch fix syscall names mix-up in libb/syscalls.c
2005-09-06 21:53:21 +00:00
"Vladimir N. Oleynik"
45a8ed89c6 - sync traceroute with Slackware-10.1
(support -FIl -g gw -i if -z pt now).
- libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
2005-09-06 16:08:33 +00:00
"Vladimir N. Oleynik"
1443487c92 typo, thanks, Bernhard Fischer 2005-09-06 13:21:39 +00:00
Rob Landley
1283a150ae Whitespace-level changes. Replace s0,s1,e0,e1 with real variable names and
clean up whitespace and curly brackets a bit.  Resulting binary should be
identical.
2005-09-06 01:57:11 +00:00
Rob Landley
9955c45907 get_terminal_width_height.c was in there twice. 2005-09-05 18:42:18 +00:00
Rob Landley
ecce943e25 Bernhard Fischer pointed out that CONFIG_FEATURE_MOUNT_FORCE no longer exists. 2005-09-05 17:52:47 +00:00
Rob Landley
f6acb660ea Regarding 11330: when you fix a bug that the testsuite doesn't catch, add
a test case to the test suite.
2005-09-05 16:27:19 +00:00
"Vladimir N. Oleynik"
d0c41a8519 destroy bug [0000381] 2005-09-05 15:50:56 +00:00
"Vladimir N. Oleynik"
f087480da1 destroy bug [0000404] 2005-09-05 15:46:26 +00:00
"Vladimir N. Oleynik"
a8c23aa795 - usage fresh bb_getopt_ulflags for ls -- very size reduce.
- small indent corrections
- remove unecessary malloc and free
2005-09-05 15:06:57 +00:00
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +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
"Vladimir N. Oleynik"
10a1fe6169 remove infinity loop ./busybox --help busybox 2005-09-05 11:25:27 +00:00
Rob Landley
8f99104362 The previous commit left confdata writing out:
CONFIG_NUMERIC_CONSTANT=

And on reading it back in, it would complain that '' was an invalid value for
that field.  I.E. "make allnoconfig && make" worked fine, but
"make allnoconfig && make menuconfig" barfed reading in the config file.

So now I have it write out "0" as the blank value.  (It's initialized to the
default value when the menu becomes visible anyway; I checked.)  That seems
to work.
2005-09-05 11:04:30 +00:00
Rob Landley
d1fa5859d6 Now that "make sizes" is in, the faq should mention it... 2005-09-05 10:25:51 +00:00
Rob Landley
dbaf97e463 Fix the warnings, and fix the following two obvious segfaults:
./busybox getopt -n one -n two woot
	./busybox getopt -o one -o two woot

This entire applet is still an enormous pile of garbage, which I can't clean
up because I really have no idea what it's for.  (Both "man getopt" and trying
it out on the command line a bit fail to enlighten me.  Reading the code, the
fact half of it seems to be special cases for bash vs tcsh does not fill me
with confidence.)
2005-09-05 06:16:53 +00:00
Rob Landley
cc1669bcde Actually returning ret might be good. 2005-09-05 05:36:15 +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
a1a1a9fa2c Remove trailing crud from busybox.tests. (Sleep deprivation strikes again...) 2005-09-04 11:13:10 +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
9754b91c16 touchup some grammar, formatting, and remove some outdated notes 2005-09-02 23:06:30 +00:00
Eric Andersen
f46f1b4d8a update the verbage describing what is needed for developer access 2005-09-02 14:10:47 +00:00
Rob Landley
7f90ae436f This goes along with the new testsuite code... 2005-09-02 01:55:58 +00:00
Rob Landley
1689075c99 Working on a new test harness. Moved the sort tests into it. 2005-09-02 00:41:53 +00:00
Rob Landley
babd3fbba6 Missing break was screwing up 'y//' command. Bug #248. 2005-09-02 00:10:06 +00:00
Rob Landley
92255d60b8 Fix for bug 383: attempting to "tar c /" would error out because stripping
trailing / turns that into an empty string.
2005-09-01 11:36:21 +00:00
Rob Landley
828548ab56 According to bug #63, crond is unhappy with crontab lines that don't end in a
newline, or lines that have trailing spaces.
2005-09-01 10:23:57 +00:00
Rob Landley
344ea471ef Tracking system but #4: php needs the environment variable SCRIPT_FILENAME. 2005-09-01 09:38:32 +00:00
Rob Landley
f815469a76 Bernhard Fischer trimmed down dos2unix a bit. 2005-09-01 03:11:19 +00:00
Rob Landley
078bacf1e9 Patch -i support from Berhnard Fischer. 2005-09-01 03:02:23 +00:00
Rob Landley
e0537f6194 Bernhard Fischer suggested that get_terminal_width_height() should return
the result of the ioctl so callers can tell if we have a tty.  (0 means
we have a tty, nonzero means the ioctl couldn't find size info and we
fake 80x24.  Really we should fake 80x25, but oh well...)
2005-09-01 02:57:45 +00:00
Rob Landley
37adefc670 Off by one error in max_leases sanity check. Bug 349, apparently. 2005-09-01 02:43:39 +00:00
Rob Landley
ac692b2cf7 Bernhard Fischer sent a patch to make "make sizes" work when building in
another output directory.
2005-09-01 02:40:21 +00:00
Rob Landley
9139770764 Busybox should only multiplex based on argv[1] when it's called as "busybox".
Otherwise if you build busybox without a given applet you get the wrong error
message when you call it via a symlink to that applet.

(You also get the wrong behavior; it tries to use argv[1] as the command
name just like busybox does for _any_ unknown, and although I doubt
"echo rm -rf *" is common usage there's no upside and enough downside to
make me nervous.)

This fixes it.
2005-09-01 00:02:56 +00:00
Rob Landley
29ee76cb2b Anand Avati hit an integer overflow problem in our unzip code. 2005-08-31 22:03:15 +00:00
Rob Landley
c8b8a2d0cf Don't comment warnings, _FIX_ warnings. (And putting in #warnings about
other warnings is just gross.)

On a side note, while I was there, I made the code slightly smaller.
2005-08-30 20:26:17 +00:00
Rob Landley
c3386a4304 Why have a separate CONFIG_INIT_SWAPON when we already have CONFIG_SWAPONOFF? 2005-08-30 18:50:37 +00:00
Rob Landley
7a8f6792f3 Bug system entry #1 says that when busybox doesn't have swapoff,
init shouldn't call swapoff.
2005-08-30 18:17:05 +00:00
Rob Landley
9a643149de Amir Shalem found some bugs in the new mount code; unknown options didn't get
added to the list, and my assumption that nfsmount() actually called
mount() was incorrect (and I coded it wrong anyway; I hate having to touch
codepaths I can't personally test).
2005-08-30 17:07:49 +00:00
Rob Landley
cc8885f6f3 Dirk Clemens pointed out how easy it is to support bzip2 compression, since we
shell out to an external program to handle gzip anyway...
2005-08-30 03:40:03 +00:00
Eric Andersen
de55987667 point to busybox.net 2005-08-28 12:47:39 +00:00
Rob Landley
d9f7165de1 Dumb little hack, "make sizes". Try it. 2005-08-28 08:24:21 +00:00
Mike Frysinger
ddddb94f05 make sure __NF_sysfs exists before trying to use it 2005-08-27 18:19:01 +00:00
Mike Frysinger
038b076e55 some portability fixes by rmh in Bug 395 2005-08-27 18:18:06 +00:00
Rob Landley
e1d9633e20 Bernhard Fischer submitted a couple of Makefile patches:
- Fix building out-of-tree
- remove duplicate rule in toplevel Makefile
- peruse make's builtin notion of `dirname $@'
2005-08-24 00:41:52 +00:00
Rob Landley
a937640bff Remove something we did, not that I'm doing something, and add something we
haven't done.  Woo.
2005-08-23 23:08:17 +00:00
Rob Landley
f4c684a1ef When compiling with FEATURE_MTAB_SUPPORT disabled, the call to erase_mtab()
can never be made because useMtab is initialized to 0, and all the other
assignments of that variable assign 0 to it.  Any compiler that can perform
simple constant propogation on local variables will optimize away if statements
testing against that variable, thus the call to erase_mtab() will never be
made.

When compiling for arm using gcc 3.3.3 with FEATURE_MTAB_SUPPORT disabled,
the linker complains that it can't find erase_mtab().  The arm optimizer isn't
exactly the brightest member of the family, and apparently needs to be hit over
the head with a hammer to get its' attention...
2005-08-23 20:03:17 +00:00
Rob Landley
6417564eeb Two FEATURE_CLEAN_UP patches from Shaun Jackman, closing filehandles. 2005-08-22 15:57:50 +00:00