Denys Vlasenko
386bc9fda3
unzip: more compat if DESKTOP=y
...
function old new delta
DESKTOP off:
unzip_main 1648 1629 -19
DESKTOP=y:
unzip_main 1939 2197 +258
Without this, midnight commander can't display .zip files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 16:52:50 +02:00
Stefani Seibold
f3b56b428f
unzip: try lseek before resorting to reading
...
function old new delta
unzip_skip 16 43 +27
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-25 02:02:22 +02:00
Denis Vlasenko
9aa5c652e9
unzip: fix thinko with le/be conv and size (closes bug 129)
...
awk: make "struct global" hack more robust wrt alignment (closes bug 131)
2009-02-26 11:21:04 +00:00
Denis Vlasenko
006e8628fc
unzip: handle "central directory"
...
needed for OpenOffice, gmail attachment .zips etc
conditional on CONFIG_DESKTOP
function old new delta
unzip_main 1643 1939 +296
find_cds_offset - 173 +173
unzip_skip 11 16 +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 474/0) Total: 474 bytes
2008-09-21 01:01:46 +00:00
Denis Vlasenko
48a9971bd4
unzip: move check for unsupported zip features to better place
2008-07-26 17:32:41 +00:00
Denis Vlasenko
c2dcb7cf63
unzip: give better error message when presented with unsupported
...
zip file. Add zip documentation and an example of file we cant
(yet) unpack.
2008-07-26 16:50:24 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
f5d8c90d73
style fixes, no code changes
2008-06-26 14:32:57 +00:00
Denis Vlasenko
f7be20e70c
nameif: extended matching (Nico Erfurth <masta@perlgolf.de>)
...
*: whitespace fixes
function old new delta
prepend_new_eth_table - 304 +304
nameif_main 620 684 +64
cc_macaddr 51 - -51
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 368/-51) Total: 317 bytes
2007-12-24 14:09:19 +00:00
Denis Vlasenko
cd0fbb5e77
unzip: hmm... gcc doesn't like ATTRIBUTE_PACKED?? Document that...
2007-11-06 02:16:01 +00:00
Denis Vlasenko
018b155ad9
telnetd: fix problem with zombies (by Paul Fox <pgf@brightstareng.com>)
...
syslogd: strip trailing NULs
2007-11-06 01:38:46 +00:00
Paul Fox
cb981638f5
change safety check on zip header to allow for extra length, and
...
revert the header read to use the correct constant rather than
sizeof. at least one version of gcc (armv4-linux-gcc-3.4.1) pads
the struct to 28 bytes in spite of the packing.
2007-11-05 23:09:03 +00:00
Denis Vlasenko
fcc569637b
unzip: add a comment explaining why we don't die
2007-10-19 21:03:09 +00:00
Denis Vlasenko
bc7c5d082e
unzip: fix endianness bugs
2007-10-18 23:27:46 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
feb7ae7f01
printf("%s\n") -> puts()
2007-10-01 12:05:12 +00:00
Paul Fox
9382b3809b
overload the existing '-q' flag so that if '-l' and '-q' are used
...
together, a "short form" listing (just pathnames) is generated.
change a few flag variables to "smallint" as well.
2007-09-07 20:28:25 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
666c40c9fc
unzip: fix xstrndup bug (xstrndup(s,n) can allocate less than n bytes!)
2007-03-31 10:17:24 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
cd42cb8df0
do not expose internal state of [g]zip unpacker.
...
fix memory leak in inflate_gunzip.
2007-01-05 23:56:53 +00:00
Denis Vlasenko
bb3d0fab3b
extern variable declaration in a .c file is heresy - fixing it
2007-01-03 01:57:25 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +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
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
d3d004dd35
last nail into error_msg() (de)capitalization
2006-10-27 09:02:31 +00:00
Denis Vlasenko
7039a66b58
correct largefile support, add comments about it.
2006-10-08 17:54:47 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
c16bd212e3
silly switch style fix
2006-09-27 19:51:06 +00:00
Bernhard Reutner-Fischer
64d7e93081
- convert a few xopen3(,,0) into xopen(,). Also peruse the fact that xopen defaults to 0777 on it's own, so we don't need to xopen3(,,0777).
...
Saves a few bytes:
$ size busybox.old busybox text data bss dec hex filename
839676 8780 243592 1092048 10a9d0 busybox.old
839660 8780 243592 1092032 10a9c0 busybox
$ make CC=gcc-4.2-HEAD bloatcheck
function old new delta
static.vconfig_main 281 279 -2
static.rx_main 1076 1074 -2
static.mt_main 294 292 -2
static.gzip_main 753 751 -2
static.mkfs_minix_main 4034 4030 -4
static.unzip_main 1771 1766 -5
static.crontab_main 1513 1507 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-23) Total: -23 bytes
2006-09-11 16:01:40 +00:00
Denis Vlasenko
22dca23d52
archival: added O_TRUNC so that when we overwrite files on unpack,
...
we truncate them. Also spotted & fixed hard to trigger bug
with extension handling.
2006-09-03 14:23:29 +00:00
Rob Landley
74bb70cf54
Ok, that's not a typo, that's just me not thinking.
2006-08-04 20:19:01 +00:00
Rob Landley
3629d95a24
Typo.
2006-08-04 20:15:18 +00:00
Rob Landley
27d07c9ce2
Now that we have xopen3(), it's just plain unclean to have xopen() with
...
O_CREAT. Two users are still doing it (and thus getting permissions 777),
I'm not sure what permissions they should be using but here they are
changed to xopen3(). This costs us a dozen or so bytes, but removing the
777 from xopen() should get some of that back.
2006-08-04 19:16:31 +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
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Rob Landley
1ec5b29054
More size shrinkage.
2006-05-29 07:42:02 +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
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
d9cf7ac781
- patch from Denis Vlasenko to add and use bb_xchdir()
2006-04-12 18:39:58 +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
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
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
Rob Landley
0a7c8ef6e2
Patch from Denis Vlasenko to constify things and fix a few typos.
2006-02-22 17:01:00 +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
b7128c6236
Cleanup patch by Bernhard Fischer, removing unnecessary includes of
...
getopt.h, whitespace changes, typos, etc.
2005-09-11 01:05:30 +00:00