Commit Graph

237 Commits

Author SHA1 Message Date
Denis Vlasenko
4cccc03768 remove useless casts (type*) xzalloc(...) 2006-12-22 18:37:07 +00:00
Denis Vlasenko
afc9ff99fd removal of commented-out cruft 2006-12-22 00:45:27 +00:00
Denis Vlasenko
714701c890 tar et al: die if bb_copyfd_size copies less than asked for.
(we have bb_copyfd_exact_size now for that kind of usage)
2006-12-22 00:21:07 +00:00
Denis Vlasenko
d9e15f2068 style cleanup: return(a) -> return a, part 2 2006-11-27 16:49:55 +00:00
Denis Vlasenko
079f8afa0a style cleanup: return(a) -> return a, part 1 2006-11-27 16:49:31 +00:00
Denis Vlasenko
c1660fea6d tar: refuse to untar files with "/../" components 2006-11-26 15:42:03 +00:00
Denis Vlasenko
b596335868 tar: correctly skip (and warn about) pax headers.
plug memory leak. save 50 bytes.
Wooohooo! we finally can unpack kernel tarballs!
2006-11-26 01:46:59 +00:00
Denis Vlasenko
87cd4a87e3 tar: small fix and small optimization 2006-11-25 23:47:32 +00:00
Denis Vlasenko
b833ca9d2d tar: buglet fix 2006-11-24 18:53:13 +00:00
Denis Vlasenko
d6772501db tar: fix and sanitize handling of long filenames/linknames
(GNU extensions 'K' and 'L').
We correctly handle them when untarring now, but unfortunately
we still don't use them when tarring! That stupid 100 char limit
is still there!
The biggest problem is that we don't support 'pax' tar format.
Linux kernel tarballs are in this format... shame
2006-11-24 17:21:44 +00:00
Denis Vlasenko
cf30cc82a3 header_verbose_list: stop truncating file size in listing 2006-11-24 14:53:18 +00:00
Denis Vlasenko
376ce1e775 tar:
* unpack: handle tar header fields which are not NUL terminated
* pack: handle 4+GB files correctly
* pack: refuse to store 101+ softlinks (was truncating link
  target name)
* pack: mask mode with 07777
2006-11-24 14:51:01 +00:00
Denis Vlasenko
9229794ab3 insmod_ng_main: -80 bytes. Stopp mmapping, use xmalloc_open_read_close(). 2006-11-21 11:58:14 +00:00
Denis Vlasenko
3eb91c2e35 cpio: (allegedly) fix bug 0001095:
"cpio hardlink support and possible memory leak fix"
2006-11-21 00:55:46 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +00:00
Denis Vlasenko
1114de7219 od: provide full-blown od from coreutils if CONFIG_DESKTOP 2006-10-10 23:26:05 +00:00
Denis Vlasenko
cba9ef5523 fixes from Vladimir Dronnikov <dronnikov@gmail.ru> 2006-10-10 21:00:47 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +00:00
Denis Vlasenko
97a8dd3857 g[un]zip: add support for -v (verbose).
Add CONFIG_DESKTOP, almost all bloat from this change
is hidden under that.
2006-10-01 15:55:11 +00:00
Denis Vlasenko
3038ac9c19 vconfig: fix bug 701 (I be damned if I understand it) 2006-09-30 19:37:25 +00:00
Denis Vlasenko
c16bd212e3 silly switch style fix 2006-09-27 19:51:06 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Denis Vlasenko
6d655be5df removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.
2006-09-06 19:02:46 +00:00
Bernhard Reutner-Fischer
5d725462d4 - strip 399424 off the bss by making decompress_uncompress buffers config buffers.
Compile tested (too lazy to look for a small .Z on the net).
$ size busybox.old busybox
   text    data     bss     dec     hex filename
 859555   10232  645732 1515519  171fff busybox.old
 859683   10232  246308 1116223  11083f busybox
$ make bloatcheck
function                                             old     new   delta
uncompress                                          1036    1160    +124
inbuf                                               2116       4   -2112
outbuf                                              4100       4   -4096
htab                                              131072       - -131072
codetab                                           262144       - -262144
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/2 up/down: 124/-399424)   Total: -399300 bytes
2006-09-06 15:28:32 +00:00
Denis Vlasenko
314908da9e tar: revert older fix (non-portable), added new one.
testsuite tar-extracts-all-subdirs now passes.
2006-09-03 14:04:33 +00:00
Denis Vlasenko
06ab5fb6b9 tar: tar xf foo.tar dir/dir did not extract all subdirs.
Added testsuite entry for this
2006-09-02 18:40:10 +00:00
Rob Landley
daf58ef61a Use xopen3() instead of an after-the-fact chown. 2006-08-04 17:26:58 +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"
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
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
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
6d0dbeb550 - use ATTRIBUTE_ALWAYS_INLINE if requested
- use shorter boilerplate while at it
2006-05-26 13:13:11 +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
Rob Landley
2ad1e7ce44 Patch from Vladamir Oleynik, reducing memory consumption. 2006-05-11 15:23:23 +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
Rob Landley
e66c7efc31 Busybox is under the GPL. 2006-04-14 19:25:01 +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
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
cfb53dfd5e - include proper prototypes in libunarchive. 2006-04-02 21:50:01 +00:00