Commit Graph

46 Commits

Author SHA1 Message Date
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denis Vlasenko
a19e64933c docs/logging_and_backgrounding.txt: new mini-doc
dnsd: remove statics, remove nerly-useless SIGINT handler
crond: correct more of logfile to 0666 (as usual, umask allows
 user to remove unwanted bits).
nameif: print errors to stderr too, not just to syslog

function                                             old     new   delta
udhcp_read_interface                                 308     306      -2
ttl                                                    4       -      -4
fileconf                                               4       -      -4
dnsentry                                               4       -      -4
interrupt                                             19       -     -19
dnsd_main                                           1463    1394     -69
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-102)           Total: -102 bytes
   text    data     bss     dec     hex filename
 808161     476    7864  816501   c7575 busybox_old
 807994     468    7856  816318   c74be busybox_unstripped
2009-03-11 14:40:00 +00:00
Denis Vlasenko
360d9661b6 libbb: add strncpy_IFNAMSIZ
function                                             old     new   delta
...
udhcp_read_interface                                 225     220      -5
brctl_main                                          1151    1146      -5
add_interface                                        109     104      -5
ipaddr_list_or_flush                                2174    2167      -7
do_add_ioctl                                          88      80      -8
vconfig_main                                         249     240      -9
do_del_ioctl                                          78      68     -10
do_iplink                                           1186    1173     -13
do_if_fetch                                          766     753     -13
buffer_fill_and_print                                196     179     -17
parse_args                                          1709    1684     -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140)         Total: -129 bytes
2008-12-02 18:18:50 +00:00
Denis Vlasenko
cfe2936a73 nameif: shrink (by Vladimir)
function                                             old     new   delta
nameif_main                                          668     636     -32
2008-08-01 02:32:23 +00:00
Denis Vlasenko
084266ed52 fix several problems with config parser:
a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes
2008-07-26 23:08:31 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
2e157ddf9e libbb: updated config_parse() from Vladimir
function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes
2008-07-19 09:27:19 +00:00
Bernhard Reutner-Fischer
679212836a - fix segfault in nameif with mactab file
(by fixing and shrink config parser)

function                                             old     new   delta
config_free_data                                       -      37     +37
config_open                                           43      48      +5
pack_gzip                                           1658    1660      +2
nameif_main                                          527     525      -2
SynchronizeFile                                      629     623      -6
make_device                                         1184    1176      -8
config_close                                          31      18     -13
config_read                                          431     393     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67)            Total: -23 bytes
2008-07-17 11:59:13 +00:00
Denis Vlasenko
fb1642f2ca fix up callsites of config_read to check for >= 0 2008-07-16 23:04:49 +00:00
Denis Vlasenko
c01340fe26 update of config file parser from Vladimir 2008-07-16 22:12:18 +00:00
Denis Vlasenko
01eaee9309 *: s/IF_NAMESIZE/IFNAMSIZ/, regularize its use a bit.
function                                             old     new   delta
strncpy_IFNAMSIZ                                       -      13     +13
set_slave_mtu                                         39      37      -2
set_slave_hwaddr                                      52      50      -2
set_master_hwaddr                                     52      50      -2
set_if_flags                                          40      38      -2
get_if_settings                                      101      98      -3
ifenslave_main                                      1680    1661     -19
vconfig_main                                         306     280     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/7 up/down: 13/-56)            Total: -43 bytes
2008-04-21 02:21:45 +00:00
Denis Vlasenko
b3f39f0cfa nameif: fix vda's breakage (Nico Erfurth <masta AT perlgolf.de>)
function                                             old     new   delta
nameif_main                                          684     691      +7
prepend_new_eth_table                                304     301      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-3)                Total: 4 bytes
2008-04-10 02:03:21 +00:00
Denis Vlasenko
6b404431aa ps: fix build breakage from vda's recent commit
*: whitespace fixes
2008-01-07 16:13:14 +00:00
Denis Vlasenko
3f9c848576 trylink: instead of build error, disable --gc-sections if GLIBC && STATIC
nameif: glibc build fixlet
2007-12-28 17:04:42 +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
3f5fdc7572 remove trailing whitespace 2007-10-14 04:55:59 +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
0beaff8c19 update Glenn McGrath's email address 2007-09-21 13:16:32 +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
fb79a2e2cf xioctl and friends by Tito <farmatito@tiscali.it>
function                                             old     new   delta
do_iptunnel                                          203     977    +774
process_dev                                         5328    5494    +166
ioctl_or_perror                                        -      54     +54
ioctl_or_perror_and_die                                -      51     +51
ioctl_alt_func                                         -      49     +49
bb_ioctl_or_warn                                       -      47     +47
do_add_ioctl                                         102     145     +43
bb_xioctl                                              -      39     +39
print_value_on_off                                     -      31     +31
get_lcm                                              105     123     +18
arp_main                                            2155    2167     +12
..................
zcip_main                                           1576    1566     -10
setlogcons_main                                       92      82     -10
dumpkmap_main                                        263     253     -10
do_get_ioctl                                          85      75     -10
setkeycodes_main                                     165     154     -11
write_table                                          244     232     -12
vconfig_main                                         318     306     -12
do_del_ioctl                                          93      81     -12
set_address                                           75      62     -13
maybe_set_utc                                         30      16     -14
loadfont_main                                        495     479     -16
slattach_main                                        712     695     -17
do_loadfont                                          191     174     -17
do_iplink                                           1155    1136     -19
getty_main                                          2583    2562     -21
fbset_main                                          2058    2035     -23
do_time                                              588     565     -23
xioctl                                                25       -     -25
read_rtc                                             186     160     -26
parse_conf                                          1299    1270     -29
udhcp_read_interface                                 269     239     -30
bb_ioctl                                              45       -     -45
bb_ioctl_alt                                          70       -     -70
bb_ioctl_on_off                                       78       -     -78
.rodata                                           129370  129018    -352
do_show                                              799       -    -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864)     Total: -548 bytes
   text	   data	    bss	    dec	    hex	filename
 675352	   2740	  13968	 692060	  a8f5c	busybox_old
 674804	   2740	  13968	 691512	  a8d38	busybox_unstripped
2007-07-14 22:07:14 +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
89f0b3486d rodata cleanup. "unable to" == "cannot". -300 bytes 2006-11-18 22:04:09 +00:00
Denis Vlasenko
2d5ca60bfb bb_get_[chomped]line_from_file wasn't descriptive enough.
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
8f8f268cfd bb_applet_name -> applet_name 2006-10-03 21:00:43 +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
Denis Vlasenko
3538b9a882 Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
2006-09-06 18:36:50 +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"
63fc1a9e08 Standardize on the vi editing directives being on the first line. 2006-07-02 19:47:05 +00:00
Rob Landley
362dc2bf33 Header cleanup on two more networking files (move libbb.h to the top and
remove #includes that libbb.h already does), plus a minor cleanup of
libbb.h to move #includes towards the top of the file where we can see 'em.
2006-06-05 17:35:24 +00:00
Rob Landley
a6e131dab3 Size reductions, mostly switching things to use libbb functions. 2006-05-29 06:43:55 +00:00
Rob Landley
b1c3fbc677 CONFIG->ENABLE migration. 2006-05-04 19:52:28 +00:00
Bernhard Reutner-Fischer
86f5c9906b - add platform.h.
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
"Vladimir N. Oleynik"
8c9daa12dc restore erronyous 'cleanups' by Rob Sullivan and landley 2006-01-15 09:29:41 +00:00
Rob Landley
855f1e1320 Cleanup patch from Rob Sullivan. 2006-01-15 02:20:06 +00:00
Eric Andersen
14f5c8d764 Patch from Bernhard Fischer to make a bunch of symbols static
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Glenn L McGrath
c6992feee3 Update my email address, document some of my tasks in the AUTHORS file 2004-04-25 05:11:19 +00:00
Eric Andersen
aff114c33d Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.

Erik - please apply.

Authors - please check that I didn't corrupt any meaning.

Package importers - see if any of these changes should be
passed to the upstream authors.

I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.

What is "pretect redefined for test" in cmdedit.c?

Good luck on the 1.00 release!

      - Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
40ea66cd9d Patch from Lars Kellogg-Stedman:
Glibc 2.1.3 (used by the Hardhat Linux SDK distributed by Cyclades)
    does not define IF_NAMESIZE in net/if.h.
2003-07-05 08:00:17 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Glenn L McGrath
a9adef0394 Dont use getopt_long, minor usage changes, patch by Nick Fedchik 2003-01-19 13:34:21 +00:00
Glenn L McGrath
77c60e5c66 Use vsyslog instead of syslog, improve initalisation and cleanup of
variables, save 300 Bytes or so, patch by Vladimir N. Oleynik
2003-01-16 11:37:57 +00:00
Eric Andersen
ab4e19afc6 Eliminate most instances where we use linux kernel headers
-Erik
2003-01-14 08:54:08 +00:00
Glenn L McGrath
688cf014af Get interface names using ioctl rather than /proc, from Nick Fedchik 2002-12-17 12:43:43 +00:00
Glenn L McGrath
8b08bda66b Fix bug when reading mac from command line, continue; if hwaddrr not found 2002-12-13 09:02:16 +00:00
Glenn L McGrath
f03c933e47 New applet, nameif by Nick Fedchik and myself. 2002-12-13 00:01:44 +00:00