Commit Graph

54 Commits

Author SHA1 Message Date
Denis Vlasenko
e9ad84dfd4 *: refactor handling of archived files. "tar f file.tar.lzma" now works too.
function                                             old     new   delta
unpack_Z_stream                                        -    1229   +1229
open_zipped                                            -     176    +176
unpack_bz2_stream_prime                                -      60     +60
tar_main                                             642     677     +35
find_main                                            406     418     +12
sv_main                                             1222    1233     +11
decode_format_string                                 829     837      +8
cmp_main                                             641     649      +8
popstring                                            134     140      +6
filter_accept_list_reassign                          120     125      +5
parse_and_put_prompt                                 800     804      +4
passwd_main                                         1053    1049      -4
make_new_name_gunzip                                 119     114      -5
rpm_main                                            1688    1670     -18
prepare                                              302     283     -19
xmalloc_open_zipped_read_close                       135      61     -74
uncompress                                          1229       -   -1229
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 8/5 up/down: 1554/-1349)        Total: 205 bytes
2008-08-05 13:10:34 +00:00
Denis Vlasenko
0381d422d9 dpkg_deb: slight code shrink
ar: reuse existing ar unpacking code
get_header_tar: handle autodetection for tiny .tar.gz files too
unarchive.h: do not include CONFIGed out things

function                                             old     new   delta
get_header_tar                                      1521    1534     +13
dpkg_deb_main                                        400     380     -20
ar_main                                              260     196     -64
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 13/-84)            Total: -71 bytes
2008-07-10 23:06:00 +00:00
Denis Vlasenko
e7fca5125a *: remove superfluous "?" in option parsing 2007-11-10 01:32:18 +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
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
e324184c05 s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36: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
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
b6aae0f381 preparatory patch for -Wwrite-strings #2 2007-01-29 22:51:25 +00:00
Denis Vlasenko
079f8afa0a style cleanup: return(a) -> return a, part 1 2006-11-27 16:49:31 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +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
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
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
d9cf7ac781 - patch from Denis Vlasenko to add and use bb_xchdir() 2006-04-12 18:39:58 +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
"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
"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
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
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
"Vladimir N. Oleynik"
27421a1878 1) bb_opt_complementaly -> bb_opt_complementally
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Mike Frysinger
348e84c202 change the hardcoded error constant (0x80000000UL) to a nice flexible define (BB_GETOPT_ERROR) 2005-05-11 00:39:03 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Glenn L McGrath
1f28b90a9c Use bb_getopt_ulflags, save 100 bytes and strict argument checking. 2004-01-07 09:24:06 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
66125c8065 Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free). 2002-12-08 00:54:33 +00:00
Glenn L McGrath
e356883ffb Minor cleanups 2002-11-13 00:24:20 +00:00
Glenn L McGrath
18bbca18ac enable .tar.bz2 for dpkg-deb 2002-11-05 01:52:23 +00:00
Glenn L McGrath
7ca04f328e New common unarchive code. 2002-09-25 02:47:48 +00:00
Glenn L McGrath
ef0eab514d Recovering from my previous commit 2001-10-25 14:49:48 +00:00
Glenn L McGrath
c3fbec73fb Change read_package_field interface, and rewrite using low level functions
Fixes for a few bugs that have crept into dpkg in the last few days
2001-07-18 15:47:21 +00:00
Glenn L McGrath
2e6d3cfa82 Nore unarchive (and doc) fixes from Laurence Anderson 2001-06-24 12:36:54 +00:00
Glenn L McGrath
8f5b63edea cpio applet, and changes to associated code 2001-06-22 09:22:06 +00:00
Glenn L McGrath
eb1c94078f Reorganise unarchiving functions, more code re-use, only does single pass(no more linked lists), basis for supporting a cpio (and cheaper untar) applet, but cpio applet isnt included in this.
It effects ar, dpkg-deb applets only
2001-06-20 07:48:00 +00:00
Glenn L McGrath
9aff903603 Reorganise archive extraction code 2001-06-13 07:26:39 +00:00
Matt Kraai
59df6f7398 Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
by Larry Doolittle.
2001-05-16 14:21:09 +00:00
Glenn L McGrath
33431ebb9a dpkg improvements, use full package struct, avoid extracting to tmp dir, rename variable.
deb_extract, untar and dpkg_deb modified to make the above possible
2001-04-16 04:52:19 +00:00
Glenn L McGrath
445fb952b8 dpkg-deb -f and partial -I commands, adds 600 bytes 2001-04-13 04:02:57 +00:00
Glenn L McGrath
3e2ab88ee2 New dpkg-deb function -t, stands for --fsys-tarfile 2001-04-12 13:49:09 +00:00
Glenn L McGrath
6785b51280 dpkg-deb -c works now 2001-04-12 11:48:02 +00:00
Glenn L McGrath
359c106871 Fix dpkg-deb, enum's are cool 2001-04-12 10:19:08 +00:00
Glenn L McGrath
4949faf4b2 copy_file_chunk uses streams now. 2001-04-11 16:23:35 +00:00
Glenn L McGrath
d22e560ad6 Move deb_extract() to libbb, dpkg now independent of dpkg-deb 2001-04-11 02:12:08 +00:00
Glenn L McGrath
9d53c8ab74 Move get_ar_headers to libbb, make dpkg_deb.c independent of ar.c 2001-04-11 01:37:03 +00:00
Glenn L McGrath
f608da4288 Ignore SIGTERM prior to gz_close() 2001-04-07 02:40:59 +00:00
Eric Andersen
fdefbbbe85 dpkg_deb had not been updated for the new gunzip interface. Fix it.
-Erik
2001-04-05 06:04:11 +00:00
Eric Andersen
67991cf824 This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Glenn L McGrath
821fbf0f42 New option 'list' produces output that can be used for the packages .list file.
Will be used be bb dpkg
2001-02-12 11:16:26 +00:00
Glenn L McGrath
bc9afadecd New function, deb-extract to be used by dpkg, code cleanups. saves some bytes 2001-02-11 03:32:41 +00:00
Matt Kraai
dd19c69904 Removed trailing \n from error_msg{,_and_die} messages. 2001-01-31 19:00:21 +00:00