Rob Landley
86b4d64aa3
These should have been part of 15767 too.
2006-08-03 17:58:17 +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
"Robert P. J. Day"
eea561871b
"formated" -> "formatted" throughout the code base.
2006-07-20 19:02:24 +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
"Robert P. J. Day"
801ab14013
Add one-line GPL boilerplate to numerous (but not all yet) source files.
2006-07-12 07:56:04 +00:00
Rob Landley
ff6e21c2ce
Fix tar so it can extract git-generated tarballs, based on a suggestion
...
from Erik Frederiksen.
2006-07-06 20:30:19 +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
"Robert P. J. Day"
edd9ca5743
More removal of "#if 0" content.
2006-07-01 14:52:12 +00:00
"Robert P. J. Day"
68229837ff
Remove all usage of the "register" storage class specifier.
2006-07-01 13:08:46 +00:00
Rob Landley
11c7a7bed6
Various cleanups I made while going through Erik Hovland's patch submissions,
...
some of which are even from him. :)
2006-06-25 22:39:24 +00:00
Rob Landley
768945b762
A few patches from Erik Hovland, turning strncpy() into safe_strncpy() and
...
removing some unnecessary code.
2006-06-25 00:34:52 +00:00
Rob Landley
b13fee4cbb
Since rangecoder is just a bunch of C functions, move it into the one user
...
(decompress_unlzma.c). Also a slight #include cleanup, and I've been meaning
to put #include <unistd.h> into libbb.h since it's so darn common...
2006-06-20 22:38:00 +00:00
Rob Landley
c4b673994e
Use xstat() instead of if(stat()) die()
2006-06-13 16:09:16 +00:00
Rob Landley
9a202c9daa
Patch from Denis Vlasenko: unlzma was make files with mode 777. Tweak
...
everything to do stat() and use xopen3().
2006-06-13 14:54:42 +00:00
Bernhard Reutner-Fischer
44e216f264
- use bb_xchdir instead of ignoring eventual errors of chdir
...
Thanks to Erik Hovland
2006-06-10 11:29:44 +00:00
Bernhard Reutner-Fischer
5929edc1fa
- spelling
2006-06-07 20:30:01 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Bernhard Reutner-Fischer
1b9d7c9aa9
- use bb_msg_{read,write}_error where appropriate.
...
text data bss dec hex filename
825015 9100 645216 1479331 1692a3 busybox.old
824919 9100 645216 1479235 169243 busybox
2006-06-03 22:45:37 +00:00
Bernhard Reutner-Fischer
d2c306e862
- ls: remove unused variable
...
- dpkg.c, diff: use xstat
text data bss dec hex filename
848823 9100 645216 1503139 16efa3 busybox_old
848679 9100 645216 1502995 16ef13 busybox_unstripped
bloatcheck is completely useless as it sees -79 for this, which is bogus.
2006-05-29 12:10:23 +00:00
Rob Landley
1ec5b29054
More size shrinkage.
2006-05-29 07:42:02 +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
Bernhard Reutner-Fischer
01d23ade57
- add central knob to turn off getopt_long everywhere. EXPERIMENTAL!
...
Adds "Enable getopt long" under "General options", default y.
Send patches to fix getopt_ulflags and run_parts.c if you turn this off..
See http://busybox.net/lists/busybox/2006-May/021828.html for a start to run-parts
2006-05-26 20:19:22 +00:00
Bernhard Reutner-Fischer
6d0dbeb550
- use ATTRIBUTE_ALWAYS_INLINE if requested
...
- use shorter boilerplate while at it
2006-05-26 13:13:11 +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
Mike Frysinger
d9b6b844e5
pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list
2006-05-13 02:33:41 +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
2ad1e7ce44
Patch from Vladamir Oleynik, reducing memory consumption.
2006-05-11 15:23:23 +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
7e21d5f6b1
Patch from Dennis Vlasenko to add the option to compress help text.
2006-04-27 23:34:46 +00:00
Bernhard Reutner-Fischer
18260d5099
- typo: s/derefernce/dereference/g
...
Thanks to P.J. Day.
2006-04-18 14:17:49 +00:00
Rob Landley
0edbad1a7c
Glenn gave permission for GPLv2 "or later".
2006-04-17 22:49:30 +00:00
Rob Landley
e66c7efc31
Busybox is under the GPL.
2006-04-14 19:25:01 +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
6b4377f333
- remove unneeded include, use shorter boilerplate while at it and also
...
shrink filter_accept_reject_list() a tiny bit while at it.
text data bss dec hex filename
59 0 0 59 3b filter_accept_reject_list.o
62 0 0 62 3e filter_accept_reject_list.o.orig
2006-04-13 13:32:16 +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
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
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
Bernhard Reutner-Fischer
cfb53dfd5e
- include proper prototypes in libunarchive.
2006-04-02 21:50:01 +00:00
Bernhard Reutner-Fischer
7ab5f4d03d
- janitorial: huft_build is never used outside of decompress_unzip.c and has no
...
prototype (which suggests that it's of no general use) so make it static for now.
2006-04-02 21:23:40 +00:00
Bernhard Reutner-Fischer
a1bccc0ba8
- typos: s/compatability/compatibility/g;s/compatable/compatible/g;
2006-04-02 20:17:55 +00:00
Paul Fox
986ab525b8
ensure that corrupted file extraction causes both a message and
...
a failure exit code. delay the error exit until all (good) files
have been extracted.
filesystem errors (nodes of wrong type, permission problems, etc)
still cause immediate failure.
2006-03-27 23:09:14 +00:00
Bernhard Reutner-Fischer
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Rob Landley
c5b1d4d6b1
Patch from Denis Vlasenko to add xstat() and use it.
2006-03-13 15:45:16 +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
Rob Landley
49a5599ae9
Patch from Denis Vlasenko to make unlzma smaller.
2006-03-09 17:51:25 +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
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
688ed0d760
Patch from Robert P. Day, moving byte order checks to use platform.h macros.
2006-03-04 22:40:25 +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
e7c43b66d7
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
...
from before "if(x) free(x)".
2006-03-01 16:39:45 +00:00
"Vladimir N. Oleynik"
325da7b509
use bb_xstrndup vs strndup. Thanks rfelker.
2006-03-01 05:39:41 +00:00
Rob Landley
0a7c8ef6e2
Patch from Denis Vlasenko to constify things and fix a few typos.
2006-02-22 17:01:00 +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
Rob Landley
06249fee39
Bug 640: a filename of length exactly 100 could bleed into the next field on
...
display or extract. (Only shows up when no gnu longname extension, either
because it's disabled or because tarball hasn't got it.)
2006-02-20 19:28:53 +00:00
Rob Landley
eb00afb2d5
The gentoo security guys found another way to segfault busybox's decompression
...
code: we can do a null dereference if one of our huffman tables has all zero
length codes. This fixes it. (Thanks solar.)
2006-02-20 02:18:03 +00:00
Rob Landley
efae294b15
Fix for an integer overflow bug that could cause a segfault on certain
...
pathological archives.
(Unlikely to have security implications, the only way to trigger it basically
wound up doing memset(dbuf,x,2^31) and triggering an immediate segfault. The
test basically gives us a more polite error message.)
Thanks to Ned Ludd and the Gentoo security guys for finding this.
2006-02-17 05:19:40 +00:00
Rob Landley
2c98c40ec8
The tendency of vi to auto-indent can be really annoying at times.
2006-02-17 05:12:03 +00:00
Rob Landley
f856eabcde
More whitespace than you can possibly imagine...
2006-02-17 03:43:49 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
Eric Andersen
2cdd4d56ff
passing around an int as a void* is a very bad idea
2006-01-30 18:33:12 +00:00
Eric Andersen
d78aea8b8e
sort out yet more type issues
2006-01-30 18:00:02 +00:00
Eric Andersen
f55289f4b9
fixup a few types to prevent gcc (rightfully) whining about mixing
...
signed and unsigned, unmatches pointer target types, etc
2006-01-30 17:27:00 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +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
Rob Landley
c1d69906a0
Patch from Aurelien Jacobs to add unlzma. (A new decompression type,
...
see www.7-zip.org)
2006-01-20 18:28:50 +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
Rob Landley
9e4100bf95
Don't return 0 when there's an error.
2006-01-10 06:19:56 +00:00
Rob Landley
e569553aa0
Bug 547: writing out the tar file header before we confirm we can actually
...
open and read from the file isn't something we can recover from after the
fact. Resequence things to check first, write second.
2006-01-09 03:07:44 +00:00
Mike Frysinger
5990efb795
use MAP_PRIVATE instead of MAP_SHARED for uClinux systems (see Bug 550)
2006-01-04 07:31:19 +00:00
Bernhard Reutner-Fischer
823f80f5ad
- silence warning about unused param
...
needs revisit later on like many others to use ATTRIBUTE_UNUSED from platform.h
2005-12-29 21:17:05 +00:00
Rob Landley
1a78103306
Bug 601: When we fork an archiver and feed stuff to it through a pipe, if
...
we don't close the pipe the child process won't exit, and we'll hang in
waitpid().
2005-12-16 21:33:10 +00:00
Bernhard Reutner-Fischer
126da9ec2d
- typo: s/sucess/success/g
...
What's up with loginutils/su.c line 42: "SYSLOG_SUCESS" ? Please have a look..
2005-12-12 11:20:39 +00:00
"Vladimir N. Oleynik"
a62b0e7459
reduce 3 warning if compile with -W
2005-12-06 12:20:57 +00:00
Rob Landley
5412843e79
I noticed that "tar tvjf file.tbz" was segfaulting. This fixed it.
2005-11-12 02:54:06 +00:00
Rob Landley
f3d6c94c7f
Add --no-same-owner and --no-same-permissions options to tar.
2005-10-27 22:49:08 +00:00
Rob Landley
a4d45d423f
The fact "tar tvjf thing.tbz" didn't work was due to the "-1" in -r11859,
...
which was apparently never tested. That meant that there always had
to be at least one unparsed argument left over, which is not the case for
tar.
2005-10-16 08:42:18 +00:00
Rob Landley
60fe7bfa41
Whitespace and curly bracket cleanup (our tabstop is 4 in busybox),
...
and switch more stuff from CONFIG to ENABLE.
2005-10-16 03:54:49 +00:00
"Vladimir N. Oleynik"
84e7511607
llist must initialize, add loses ifdef, small indent correction
2005-10-15 06:32:38 +00:00
Rob Landley
3ee6c24ea2
Add --exclude option (to make uClibc-0.9.28 headers install using busybox tar).
...
I have no idea how to apply bb_getopt_complementally to a --longopt that
has no short option. The documentation from vodz has a bad case of
babelfish poisoning, and I can't understand it. It sort of seems to
suggest there is a way, but what it is I have no idea. So I used \n as
the short option, which is fairly unlikely to be used for something else. :)
2005-10-15 03:06:21 +00:00
"Vladimir N. Oleynik"
f704b27b5b
- new bb_opt_complementally syntax, use [-:?] only - 'free' chars
...
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
Bernhard Reutner-Fischer
309dc2d642
- typo in makefile variable: s/archvial/archival/
2005-10-13 10:19:35 +00:00
"Vladimir N. Oleynik"
6c35c7c976
usage bb_dev_null
2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
f1ab127077
Prepend '-' to the first argument if required, more const, indent
2005-10-12 08:34:27 +00:00
"Vladimir N. Oleynik"
f588869696
new featured bb_opt_complementally, correct argc checking
2005-10-12 08:17:29 +00:00
Rob Landley
161aae7273
There doesn't seem to be a standard header for makedev(), but this is close.
2005-10-11 20:17:30 +00:00
"Vladimir N. Oleynik"
064f04e7e2
- use complementally '!' to '?' - 'ask' is best 'free' char for this.
...
- more long opt compatibility, can set flag for long opt struct now
- more logic: check opt-depend requires and global requires, special for 'id' and 'start-stop-daemon' applets.
2005-10-11 14:38:01 +00:00
"Vladimir N. Oleynik"
083d3f49c2
bb_mkdep: Rewroted. removed problem "include name must uniq", speed up * 3.
...
e2fsprogs: remove confuse bb_mkdep. Use internal e2fsprogs includes only.
other: remove confuse bb_mkdep.
2005-10-10 11:35:17 +00:00
Bernhard Reutner-Fischer
0b42a6a8cf
- remove superfluous C statements ";;" in decompress_unzip.c, dpkg_deb.c ifconfig.c
...
- gzip.c: see if O_NOFOLLOW is defined before using it, else take alternate path
closes bug #221 (partially; The rest will follow later).
2005-10-07 11:34:50 +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
Rob Landley
1ff789c567
Stop gcc4 from nit-picking about signedness of char *.
2005-09-25 03:12:26 +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
Bernhard Reutner-Fischer
d5bd137a24
- rename libbb's password helpers as suggested in libbb.h
...
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
2005-09-20 21:06:17 +00:00
Rob Landley
2d2c868aab
Patch from Berhnard Fischer to keep duplicate objects out of the library.
2005-09-14 15:41:18 +00:00