Bernhard Reutner-Fischer
2d1a6e7c1f
- fix bug #887 , in bb_get_chomped_line_from_file(), the last char was removed
...
unconditionally, even if it was not a newline.
This was apparently broken by r14254
- whitespace while at it.
2006-06-10 11:04:43 +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
Mike Frysinger
6fb5847faf
sometimes daemonizing and vfork()/exit() is ok
2006-06-07 21:48:30 +00:00
Mike Frysinger
ca70774293
bb_xdaemon() isnt available on no-mmu systems
2006-06-07 21:47:34 +00:00
Mike Frysinger
373af43bb0
comment all fields
2006-06-07 21:37:59 +00:00
Mike Frysinger
301ad67912
add reference to proc(5)
2006-06-07 20:24:34 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Mike Frysinger
828d6bb3bc
whitespace
2006-06-07 20:04:13 +00:00
Mike Frysinger
62a2c15376
whitespace
2006-06-07 20:03:13 +00:00
Bernhard Reutner-Fischer
f9437aaf5b
- make getopt_ulflags aware of CONFIG_GETOPT_LONG
2006-05-31 14:12:51 +00:00
Bernhard Reutner-Fischer
f3ac9ebc8e
- convert xcalloc(1,x) to xzalloc
2006-05-31 13:31:16 +00:00
Bernhard Reutner-Fischer
c418d482ba
- s/defined(__uClinux__)/BB_NOMMU/
...
This needs a second pass to:
+ add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag)
+ eventually globally export argc and argv, so we don't need to pass it to
bb_daemon().
2006-05-31 10:19:51 +00:00
Rob Landley
bba7f08d27
Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts values
...
to/from little endian or big endian, which is a NOP if that's what the current
platform already is.
2006-05-29 05:51:12 +00:00
Rob Landley
8bb50782a5
Change llist_add_* to take the address of the list rather than returning the new
...
head, and change all the callers.
2006-05-26 23:44:51 +00:00
Rob Landley
5edc10275e
Slight sanity fix: data is void *, not char *. And it's called data
...
almost everywhere, so be consistent.
2006-05-26 23:00:10 +00:00
Bernhard Reutner-Fischer
781e42d66c
- introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).
...
- fix last.c to also look at the double-underscore UT_ defines.
2006-05-26 14:41:40 +00:00
Bernhard Reutner-Fischer
76b82cfd6f
- make find_mount_point conditional on df and eject; Fixes `make hosttools´ on
...
hosts where mntent.h does not exist.
2006-05-26 13:38:43 +00:00
Mike Frysinger
4f93a63467
errno and h_errno values are not the same #876 by rfelker
2006-05-26 01:56:42 +00:00
Rob Landley
399d2b5c24
Rich Felker suggested removing dprintf() from watch, and one thing led to
...
another... This adds bb_xspawn() support, which does vfork/exec. (I don't
know why using a static instead of a local adds ~40 bytes, but using
the local doesn't work...)
2006-05-25 23:02:40 +00:00
Rob Landley
80b8ff07ca
A pending item in my tree I might as well check in: I plan to migrate calloc()
...
and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but
only takes one argument (the size).
2006-05-19 20:36:49 +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
Bernhard Reutner-Fischer
0a8812bdc5
- replace _PATH_DEVNULL with bb_dev_null
2006-05-19 13:12:21 +00:00
Bernhard Reutner-Fischer
38583fd6f2
- use uint32_t instead of __u32
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:44:16 +00:00
Bernhard Reutner-Fischer
a2a647dfc1
- include strings.h
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Bernhard Reutner-Fischer
e2e56c7c41
- single KERNEL_VERSION(a,b,c) macro in platform.h
...
- rename get_kernel_revision() to get_linux_version_code
from Robert P. J. Day
2006-05-19 11:54:02 +00:00
Rob Landley
34b5319d86
Make md5 calculation always go through an the buffer so that A) we don't
...
handle packets out of sequence if some data goes through the buffer and
some doesn't, B) it works on systems that can't handle aligned access,
C) we just have one code path to worry about.
While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine
well, which is why md5sum has been reading and processing data 4 bytes at a
time. I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop
unrolling and such in the algorithm was an attempt to work around that bug.
2006-05-16 02:38:26 +00:00
Bernhard Reutner-Fischer
2f38f27b42
- patch from Robert P. J. Day to use filter instead of findstring.
2006-05-15 10:04:50 +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
f7897ec47b
Autodetect parts of a multipart file, from Robert P. Day's suggestion.
2006-05-12 01:42:33 +00:00
Rob Landley
cc848ddbf8
Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
...
to the file.
2006-05-11 18:25:24 +00:00
Rob Landley
a6b5b60942
Fiddling with llist to make memory management easier. Specifically, the
...
option to delete the contents of the list when we delete the list is a
good thing.
2006-05-08 19:03:07 +00:00
Rob Landley
0ea0aefcb5
Remove a link that leaked in from the pending llist_t changes.
2006-05-08 15:08:25 +00:00
Rob Landley
a389651115
Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
...
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
2c39eee805
Migrate endianness macros.
2006-05-05 16:54:40 +00:00
Rob Landley
552b56dfd1
Not quite compiler independent, but we've never tried to be gcc independent
...
anyway. This is at least less ugly than what was there before, and fixes
building all sources at once.
2006-05-04 21:22:27 +00:00
Rob Landley
f76cd964ec
Whitespace and documentation cleanup from Dennis Vlasenko.
2006-05-03 21:23:15 +00:00
Rob Landley
7818a422bc
Portability tweak from Shaun Jackman, don't include asm/page.h directly.
2006-04-25 18:42:23 +00:00
Rob Landley
bbd50b58ea
Remove some #if 0 code.
2006-04-18 20:42:39 +00:00
Bernhard Reutner-Fischer
54f75ee300
- BusyBox is under GPL.
...
in http://www.busybox.net/lists/busybox/2006-April/020364.html Denis Vlasenko
said when asked which license to use for these files:
"Sure. LGPL or GPL is fine with me."
Adjusting accordingly.
2006-04-18 08:24:13 +00:00
Mike Frysinger
1a54030445
use memmove() instead of bcopy()
2006-04-16 05:58:21 +00:00
Mike Frysinger
78bd504947
use memcmp() not bcmp()
2006-04-16 05:51:47 +00:00
Bernhard Reutner-Fischer
c2cb0f32b4
- patch from Denis Vlasenko to add and use bb_xopen3()
2006-04-13 12:45:04 +00:00
Bernhard Reutner-Fischer
d9cf7ac781
- patch from Denis Vlasenko to add and use bb_xchdir()
2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
67f641e75b
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
2006-04-12 18:24:37 +00:00
Bernhard Reutner-Fischer
2c99851181
- patch from Denis Vlasenko to add and use bb_xdaemon()
2006-04-12 18:09:26 +00:00
Bernhard Reutner-Fischer
dac7ff15b7
- patch from Denis Vlasenko to add and use bb_xsocket() and to use
...
bb_xopen some more while at it.
Also use shorter boilerplate while at it.
2006-04-12 17:55:51 +00:00
Bernhard Reutner-Fischer
cb44816ba3
- add and use bb_opendir(), bb_xopendir().
...
text data bss dec hex filename
889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig
889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2
889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig
888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
2006-04-12 07:35:12 +00:00
Rob Landley
c57ec37959
Patch from Rob Sullivan to consolidate crc32 table generation.
2006-04-10 17:07:15 +00:00
Bernhard Reutner-Fischer
fa939aae81
- include proper headers.
2006-04-05 16:21:37 +00:00
Bernhard Reutner-Fischer
421d9e5941
- move buffer allocation schemes to libbb.h
...
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-04-03 16:39:31 +00:00