Commit Graph

5401 Commits

Author SHA1 Message Date
Rob Landley
90632d021c Bug fix from Kim B. Heino, manifested via:
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip
2006-02-13 19:40:43 +00:00
Rob Landley
7bfa88f315 New USE() macros
For each CONFIG_SYMBOL, include/bb_config.h now has both ENABLE_SYMBOL
and USE_SYMBOL(x).  ENABLE_SYMBOL is still always defined (1 or 0) so that
if(ENABLE) should optimize out when it's zero.  The USE_SYMBOL(X) will only
splice in X if the symbol is defined, otherwise it'll be empty.

Thus we can convert this:

#ifdef CONFIG_ARGS
    opt = bb_getopt_ulflags(argc, argv, "ab:c"
#ifdef CONFIG_THINGY
        "d:"
#endif
        , &bvalue
#ifdef CONFIG_THINGY
        , &thingy
#endif
    );
#endif

into this:
    if (ENABLE_ARGS) {
        opt = bb_getopt_ulflags(argc, argv, "ab:c" USE_THINGY("d:"), &bvalue
                USE_THINGY(, &thingy));
    }

And it should produce the same code.

Unlike the old versions in include/_usage.h, the new USE_SYMBOL(x) can handle
commas in its arguments (as shown above).  (The _usage.h file is obsolete and
no longer generated.)

Nobody should need to include config.h directly anymore, bb_config.h should
define all the configuration stuff we need.  Someday, the CONFIG_SYMBOL
versions should go away in favor of ENABLE_SYMBOL and USE_SYMBOL().

Thanks to vodz for the new version of bb_mkdep.c that works with function
macros.
2006-02-13 19:16:41 +00:00
Bernhard Reutner-Fischer
f251ec6847 - commentary typos 2006-02-12 11:25:32 +00:00
Rob Landley
c29a0f371a More random documentation. 2006-02-12 00:45:39 +00:00
Rob Landley
4926d643ea Missed this in svn 13701. 2006-02-10 21:38:20 +00:00
Rob Landley
4a1d874e1d Another item. 2006-02-10 21:36:53 +00:00
Rob Landley
cc6d8d30ec Fix umount so it works if there's no /etc/mtab or /proc/mounts, make
umount -a into a CONFIG_FEATURE (why not?), and zap the now obsolete
defconfig file (which was supposed to be part of the previous checkin).
2006-02-08 20:06:57 +00:00
Rob Landley
1ab4c3dc25 Help text update and tweak to defconfig to remove two more things that
the "maximum sane configuration" shouldn't have.  (Explicit MTAB support in
mount, which you should only need if you have no /proc, and FEATURE_CLEAN_UP,
which exists to humor valgrind and otherwise just bloats the code).
2006-02-08 18:50:17 +00:00
Rob Landley
32251b4825 Convert some help text to english. 2006-02-08 18:34:21 +00:00
Mike Frysinger
271aa40a15 add back in path nulling after calling find_dev() since it is needed for now ... 2006-02-07 06:10:45 +00:00
Mike Frysinger
27a74e8017 Cristian Ionescu-Idbohrn writes:
force enough space padding so that applet names always end up on their own line
2006-02-07 00:58:11 +00:00
Mike Frysinger
0380166916 space out supported applet names so the config list doesnt wrap on an 80col terminal 2006-02-07 00:51:07 +00:00
Mike Frysinger
4fcefb9e90 fixup whitespace in awk help output 2006-02-06 23:38:59 +00:00
Rob Landley
30a6bba65f Bug 677: there are apparently still people using telnet. 2006-02-06 02:49:45 +00:00
Mike Frysinger
ba9c4d1f89 get rid of warnings with applets that have no usage and get rid of pointless --- separator between applets 2006-02-06 01:11:34 +00:00
Mike Frysinger
f37529d6b6 if the .pl script gets updated, force doc regen 2006-02-05 22:15:39 +00:00
Mike Frysinger
b0ed3d7cc0 Rob Sullivan writes: Here's a patch to autogenerate the list of applets in the Busybox documentation 2006-02-05 22:10:40 +00:00
Rob Landley
bec26527a1 Save a few bytes in error message. 2006-02-05 03:31:44 +00:00
Mike Frysinger
a421ba8203 cleanup style ... just because you use less spaces doesnt mean the resulting code is smaller 2006-02-03 00:25:37 +00:00
Mike Frysinger
248d2220f9 shrink the code a bit 2006-02-03 00:19:42 +00:00
Mike Frysinger
53d57dbe6b gavinl writes in Bug 661:
if read() file return less than 1, we should close the fd and then goto end.
2006-02-03 00:16:53 +00:00
Mike Frysinger
5509228a7b alphabetical order and fix mdev comments about echo>/sys vs echo>/proc/sys 2006-02-02 23:14:57 +00:00
Mike Frysinger
35cf19d741 fix mdev help output 2006-02-02 22:52:59 +00:00
"Vladimir N. Oleynik"
4fc92206ed destroy bug 679, use getopt_ulflags with new feature: usage option. Removed two strdup 2006-02-02 14:48:54 +00:00
Mike Frysinger
b38673fb9f make the build system puuuuuuuuuuurty 2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
1f04c9d29c removed anoinig `unused' warnings 2006-02-01 14:47:52 +00:00
"Vladimir N. Oleynik"
73ffd762ca removed anoinig warnings 2006-02-01 12:56:19 +00:00
"Vladimir N. Oleynik"
b399a96343 remode warning: const static mix 2006-02-01 12:41:35 +00:00
Bernhard Reutner-Fischer
3038557649 - bzero -> memset
text    data     bss     dec     hex filename
1652855   14444 1215616 2882915  2bfd63 busybox.oorig.gcc-3.3
1652823   14444 1215616 2882883  2bfd43 busybox.gcc-3.3
1603655   14412 1215552 2833619  2b3cd3 busybox.oorig.gcc-3.4
1603655   14412 1215552 2833619  2b3cd3 busybox.gcc-3.4
1609755   14508 1215744 2840007  2b55c7 busybox.oorig.gcc-4.0
1609755   14508 1215744 2840007  2b55c7 busybox.gcc-4.0
1590495   13516 1215392 2819403  2b054b busybox.oorig.gcc-4.1-HEAD
1590495   13516 1215392 2819403  2b054b busybox.gcc-4.1-HEAD
1589079   13036 1213248 2815363  2af583 busybox.oorig.gcc-4.2-HEAD
1589079   13036 1213248 2815363  2af583 busybox.gcc-4.2-HEAD
2006-01-31 17:57:48 +00:00
"Vladimir N. Oleynik"
87be316149 more better for me signed<->unsigned and the const keyword usage 2006-01-31 14:25:52 +00:00
"Vladimir N. Oleynik"
4333a09d65 add feature: support for running scripts through an interpreter. Thanks Florian Schirmer <jolt@tuxbox.org> 2006-01-31 13:53:30 +00:00
"Vladimir N. Oleynik"
1f17d3287a more obscure 2006-01-31 12:36:51 +00:00
"Vladimir N. Oleynik"
7600eec732 avoid signed<->unsigned warning 2006-01-31 12:12:15 +00:00
"Vladimir N. Oleynik"
57545c810a avoid signed<->unsigned warning 2006-01-31 12:06:57 +00:00
"Vladimir N. Oleynik"
4d57926bd3 removed unneed signed, avoid warning 2006-01-31 11:57:06 +00:00
Bernhard Reutner-Fischer
81b94960a2 - pass -static via CC rather than LD 2006-01-31 11:29:22 +00:00
"Vladimir N. Oleynik"
39e7510664 more destroy potential overflow for x86_64. 2006-01-31 11:19:12 +00:00
"Vladimir N. Oleynik"
77bb33c474 destroy potential overflow for x86_64. Added ATTRIBUTE_UNUSED 2006-01-31 11:16:40 +00:00
Bernhard Reutner-Fischer
9f4a1e1c75 - add and use ATTRIBUTE_ALIGNED(num_bytes)
- remove unused parameter pindex from fdisk.c, xbsd_initlabel()
2006-01-31 09:53:53 +00:00
"Vladimir N. Oleynik"
dfe6e74157 changed strange mix signed<->unsigned 2006-01-31 09:44:04 +00:00
"Vladimir N. Oleynik"
dd14ca082a protect potential overflow for x86_64 2006-01-31 09:35:45 +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
Bernhard Reutner-Fischer
cd98555dfa - fix typo i introduced yesterday. 2006-01-31 08:17:13 +00:00
Rob Landley
9e275e3450 Not on libbusybox.so: it's GPL, no API barrier, no stability promise. 2006-01-31 03:45:26 +00:00
Rob Landley
a167ec5e63 Turn defconfig into what make allyesconfig is today. Turn allyesconfig
back into allyesconfig.  (Memo: apparently SELINUX doesn't compile anymore.)

Make defconfig shouldn't switch on libbusybox.so, but allyesconfig does.
2006-01-31 02:42:50 +00:00
Eric Andersen
3496fdc9a5 hopefully the last of the annoying signed/unsigned and mixed type errors 2006-01-30 23:09:20 +00:00
Eric Andersen
a68ea1cb93 fix up yet more annoying signed/unsigned and mixed type errors 2006-01-30 22:48:39 +00:00
Eric Andersen
9a58b02ec7 make certain we dereference the pointer as a time_t, esp on x86_64
where it might otherwise not be dereferenced as such by default
2006-01-30 22:33:31 +00:00
Eric Andersen
0cb6f35c33 fix up annoying signed/unsigned and mixed type errors 2006-01-30 22:30:41 +00:00
Eric Andersen
5e678873f9 clean up yet more annoying signed/unsigned mismatches and fixup
yet more incorrect types
2006-01-30 19:48:23 +00:00