Commit Graph

1043 Commits

Author SHA1 Message Date
Denis Vlasenko
f8c8bb1160 wget: yet another contortion for proftpd's PASV response. 2006-11-21 19:10:26 +00:00
Bernhard Reutner-Fischer
921f5df25f - add 'ip rule' support. First take..
text    data     bss     dec     hex filename
   2999       0       0    2999     bb7 networking/libiproute/iprule.o
2006-11-21 15:36:08 +00:00
Denis Vlasenko
04b30ba3b8 ifconfig: preparatory patch, no code changes 2006-11-21 14:26:37 +00:00
Bernhard Reutner-Fischer
a8381948da - style fixes 2006-11-21 11:23:11 +00:00
Denis Vlasenko
1288722f3e wget: add TODO 2006-11-21 11:15:58 +00:00
Denis Vlasenko
40f62a8c3d wget: fix ftp PASV mode ("numeric" check was too strict) 2006-11-21 11:04:31 +00:00
Denis Vlasenko
9cade08917 wget: reduce likelihood of ETA overflow (especially with !LFS) 2006-11-21 10:43:02 +00:00
Denis Vlasenko
04291bc5ae httpd: slight reduction of #ifdef forest
few other applets: #ifdef CONFIG_ -> #if ENABLE_
traceroute: fix exposed bugs
defconfig: update
2006-11-21 10:15:25 +00:00
Denis Vlasenko
5d148e2646 httpd: fix cgi-bin/index.cgi support, add example of it,
stat: fix end-of-line if format is specified (wasn't printing it),
      fix %z (time) format to match coreutils 6.3
2006-11-21 00:12:09 +00:00
Denis Vlasenko
fcdb00f735 httpd: LC_TIME locale _must_ be POSIX to httpd! We speak over the net! 2006-11-21 00:09:37 +00:00
Denis Vlasenko
6c85ddc850 httpd: add support for directory indexer (cgi-bin/index.cgi) 2006-11-21 00:08:39 +00:00
Denis Vlasenko
a3ee69fa6c httpd: get rid of big, useless blocks (deindent,
bring code under 80 columns)
2006-11-21 00:07:31 +00:00
Denis Vlasenko
0bb993f39b httpd: More robust Content-length: parsing,
code reorganization (less indented)
2006-11-21 00:06:28 +00:00
Denis Vlasenko
736230e209 dhcprelay: new applet 2006-11-20 19:40:36 +00:00
Denis Vlasenko
c9cdeaa3fe add compile-time check for correct DHCP packet size 2006-11-20 01:13:09 +00:00
Denis Vlasenko
4a5cf16a36 login: use %s - we know that string is not too long there
ping[6]: use getopt32: smaller (-50 bytes) and handles -c6 correctly
(was requiring '-c 6' with mandatory space)
2006-11-20 00:48:22 +00:00
Denis Vlasenko
89f0b3486d rodata cleanup. "unable to" == "cannot". -300 bytes 2006-11-18 22:04:09 +00:00
Denis Vlasenko
61126ab30a small fixes: using fd-based io instead of FILE*-based,
missed O_TRUNC, etc
2006-11-18 22:03:26 +00:00
Denis Vlasenko
5a3395bc01 udhcp: fix indentation and style.
Eliminate (group) a lot of smallish *.h files
Remove lots of unneeded #includes
2006-11-18 19:51:32 +00:00
Denis Vlasenko
a7189f01a4 add -Wundef, fix uncovered bugs 2006-11-17 20:29:00 +00:00
Denis Vlasenko
a5342b4541 httpd: make Bernhard happier 2006-11-17 18:26:57 +00:00
Denis Vlasenko
b3a071543d httpd: reduce ifdef forest. comment out redundant PATH setting 2006-11-16 18:04:43 +00:00
Denis Vlasenko
d4f3d1a4bd httpd:
fix union aliasing bug
symptom: wget of non-existent file gets redirected to /text/html/something
on second and subsequend wget attempts
fix double-free bug
symptom: glibc caught double-free (we didn't NULL config->xxx ptrs after free)
2006-11-16 16:20:12 +00:00
Denis Vlasenko
0871bc89fb httpd: add -i (inetd) and -f (foreground) otions.
-i makes possible to run httpd in both inetd and standalone mode
without recompile (or need to have two different binaries)
2006-11-16 16:17:02 +00:00
Denis Vlasenko
e867b7ce86 httpd: stop being silly with setenv 2006-11-16 16:12:09 +00:00
Denis Vlasenko
6c5e5a0e85 httpd: cosmetic fixes (the bug which was being hunted down
turned out to be nonexistent :)
2006-11-10 23:28:57 +00:00
Denis Vlasenko
067e3f031a wget: fix error message.
Bad:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
: HTTP/1.0 404 Not Foundror 404 Not Found
Good:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
get: server returned error: HTTP/1.0 404 Not Found

nslookup: fix my mistake
applets: make Bernhard Fischer <rep.nop@aon.at> happy :)
2006-11-10 23:25:53 +00:00
Denis Vlasenko
8528151658 small ipv6 doc changes; nslookup a tiny bit smaller 2006-11-07 19:05:43 +00:00
Denis Vlasenko
9f60929cc4 httpd: sendCgi() forked child needs to close opened
server socket and accepted socket
2006-11-05 19:47:33 +00:00
Denis Vlasenko
5af906e7c8 rename: compare_string_array -> index_in_str_array
introduce index_in_substr_array and use it in
iproute2
2006-11-05 18:05:09 +00:00
Denis Vlasenko
9d4533ede1 Fix kbuild bugs noticed by Bernhard Fischer <rep.nop@aon.at> 2006-11-02 22:09:37 +00:00
Denis Vlasenko
9225854144 mostly style fixes 2006-11-01 10:25:35 +00:00
Denis Vlasenko
5d499e1600 find: a lot more compliant to 'standard' find
(we were not respecting order of actions!).
Add -o and -a handling.
2006-10-29 19:07:01 +00:00
Denis Vlasenko
5c7596058d ls: cleanup part 1 2006-10-28 12:37:16 +00:00
Denis Vlasenko
621204bbf6 get_terminal_width_height: do not pass insanely large values 2006-10-27 09:03:24 +00:00
Denis Vlasenko
d3d004dd35 last nail into error_msg() (de)capitalization 2006-10-27 09:02:31 +00:00
Denis Vlasenko
f0ed376eda remove bb_printf and the like 2006-10-26 23:21:47 +00:00
Denis Vlasenko
ebe578ab2f nslookup: make it more IPv6 friendly 2006-10-26 17:17:59 +00:00
Denis Vlasenko
1457915afc xconnect is non-conforming to "xfunc like libc" rule. Fixing 2006-10-26 01:09:46 +00:00
Denis Vlasenko
940b2e4b73 ip: "ip addr del" and "ip addr delete" both should work 2006-10-26 00:38:22 +00:00
Denis Vlasenko
c6f188def8 silly size savings and capitalization fixes 2006-10-26 00:37:00 +00:00
Denis Vlasenko
d18a3a20db use skip_whitespace where appropriate 2006-10-25 12:46:03 +00:00
Denis Vlasenko
c8400a2162 wget: wget $'-\207' ... should not be allowed to work. ever. :)
So fix wget & getopt32. Also fix multiple --header options
order: add and use rev_llist.
2006-10-25 00:33:44 +00:00
Denis Vlasenko
7534e0834f wget: -100 bytes, reduce stack usage, remove --header length limit 2006-10-23 23:21:58 +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
4e33e07f60 strip -> $(STRIP); fix "unused variable" warning
(patch by Diekema, Jon (AGRE) <Jon.Diekema@smiths-aerospace.com>)
2006-10-16 18:24:57 +00:00
Denis Vlasenko
d0e70af9d1 nc: fix 2 my own buglets, and few someone else's too. 2006-10-16 01:10:28 +00:00
Denis Vlasenko
c6ec8c9680 telnetd: check ptsname() for NULL 2006-10-15 18:22:05 +00:00
Denis Vlasenko
023b57d935 wget: xatoi's were oversealous ("200 OK" isn't a number) 2006-10-15 17:05:55 +00:00
Denis Vlasenko
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +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
a6dbb08a48 small style fixes 2006-10-12 19:29:44 +00:00
Denis Vlasenko
f6f43df60b ifupdown: stop emitting annoying/misleading error messages.
Patch by Gabriel Somlo <somlo at cmu.edu>
2006-10-11 22:16:56 +00:00
Denis Vlasenko
cba9ef5523 fixes from Vladimir Dronnikov <dronnikov@gmail.ru> 2006-10-10 21:00:47 +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
5625415085 dd: make it recognize not only 'k' but 'K' too;
make it (partially) CONFIG_LFS-aware
2006-10-07 16:24:46 +00:00
Denis Vlasenko
96e9d3c968 wget: don't be careless with xstrdup'ing 2006-10-07 14:28:55 +00:00
Denis Vlasenko
a655152b00 wget: fix download of URLs like:
http://busybox.net?var=a/b
http://busybox.net?login=john@doe
http://busybox.net#test/test
2006-10-07 14:28:28 +00:00
Denis Vlasenko
c12f53090b dnsd fix; option_mask32 added. dnsd needs more love. 2006-10-06 09:49:47 +00:00
Denis Vlasenko
000b9ba91f eject: -T fix 2006-10-05 23:12:49 +00:00
Denis Vlasenko
de59c0f58f httpd: add -u user[:grp] support 2006-10-05 22:50:22 +00:00
Denis Vlasenko
7d219aab70 build system overhaul 2006-10-05 10:17:08 +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
40920825d5 rename bb_default_error_retval -> xfunc_error_retval 2006-10-03 20:28:06 +00:00
Denis Vlasenko
9275814a9e lots of silly indent fixes 2006-10-03 19:56:34 +00:00
Denis Vlasenko
6edaddec02 traceroute: fix compilation if netinet/protocols.h is missing 2006-10-03 18:19:02 +00:00
Denis Vlasenko
7c1ed2e922 traceroute: do not look up icmp protocol# in /etc, it is well-known :) 2006-10-03 10:47:35 +00:00
Denis Vlasenko
1c3577f91d ifupdown: Debian users contributed improvement to it 2006-10-02 20:57:10 +00:00
Denis Vlasenko
f8aa109a9f wget: make progress bar and ETA work correctly with -c 2006-10-01 10:58:54 +00:00
Denis Vlasenko
55a994055f lsmod: repair indentation
httpd: ifdef CONFIG -> if ENABLE (shorted, catched typos)
2006-09-30 20:41:44 +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
7935a5a992 libiproute/ll_map.c: fix bug 279
("On-demand net module loading fails with CONFIG_FEATURE_IFUPDOWN_IP")
2006-09-30 00:18:16 +00:00
Denis Vlasenko
a959588b80 Yet another silly little byte saving. couldn't -> cannot 2006-09-29 21:30:43 +00:00
Denis Vlasenko
981b24db5e rt_names.c: move few strings into rodata 2006-09-28 22:36:23 +00:00
Denis Vlasenko
06b543b217 ifupdown: make dhcp start/stop scripts user configurable
in /etc/network/interfaces. Patch author is Gabriel L. Somlo <somlo@cmu.edu>
2006-09-28 22:31:51 +00:00
Denis Vlasenko
c16bd212e3 silly switch style fix 2006-09-27 19:51:06 +00:00
Denis Vlasenko
2f4399c6cc ifupdown: fix for standalone shell; removed hardcoded PATH 2006-09-27 14:14:51 +00:00
Denis Vlasenko
0534125ccc ifupdown: style cleanup, no code changes 2006-09-26 20:35:30 +00:00
Denis Vlasenko
e175ff252f several fixes from openWRT project 2006-09-26 17:41:00 +00:00
Denis Vlasenko
8b8c75e6ab httpd: sanitize indentation 2006-09-26 10:07:41 +00:00
Denis Vlasenko
a552eeb498 wget: add (configurable) large file support. Run tested. 2006-09-26 09:22:12 +00:00
Denis Vlasenko
a94554d010 wget: fix bug where wget creates null file if there is no remote one.
add O_LARGEFILE support (not run tested :).
2006-09-23 17:49:09 +00:00
Denis Vlasenko
c1876d7364 inetd: deindent main loop, other readability enhancements 2006-09-23 15:58:01 +00:00
Denis Vlasenko
ec17d437ab inetd: reformat with tabs for indentation 2006-09-23 15:18:38 +00:00
Denis Vlasenko
7f1f5b001f ifupdown: getopt_ulflags'ification. 2006-09-23 12:49:01 +00:00
Denis Vlasenko
a65a17700a arping: fix bug (getopt_ulflags and optarg don't mix),
remove unreachable error path.
2006-09-23 12:46:30 +00:00
Denis Vlasenko
754a88f7aa netstat: getopt_ulflags'isation 2006-09-22 16:02:40 +00:00
Denis Vlasenko
8514fc5681 hostname: getopt_ulflags'isation 2006-09-22 08:53:14 +00:00
Denis Vlasenko
0e87d347e8 telnetd: getopt_ulflags'isation 2006-09-22 08:50:29 +00:00
Denis Vlasenko
9213a9e0f2 whitespace cleanup 2006-09-17 16:28:10 +00:00
Rob Landley
f5fc1384e9 So, in the cornucopia of superfulous warning directives I didn't add to the
tree, we have the warning about failed inlines (which with our inline
limit set to zero means any usage of the "inline" keyword at all).  Note
that setting the inline limit to zero, and using -Werror, both predated
adding the warning about inlines to the tree.  So whatever checkin added
that did nothing but break the tree.  But oh well.

The second category of superfluous warnings is warning about functions with
no previous declaration.  Apparently, if you add ALWAYS_INLINE to an empty
function definition, it considers the sucker undeclared as far as the
warning is concerned.  (I.E. it's a buggy warning.  I try not to ask the
compiler to generate warnings it can't competently generate.)

This is why I removed "inline" (unbreak allbareconfig), and couldn't replace it
with "ALWAYS_INLINE" (still broke allbareconfig).
2006-09-15 04:08:25 +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
Rob Landley
49ea46667f Build fixes for gcc 4.0 with -Werror, from Tito. 2006-09-11 01:34:21 +00:00
Denis Vlasenko
3526a1320a wget: wrap one atrociously long line (around 200 chars long!). 2006-09-09 12:20:57 +00:00
Denis Vlasenko
d797fcd726 udhcp: FEATURE_UDHCP_SYSLOG should be selected only if
udhcp[cd] really are going to use it.
2006-09-09 12:18:46 +00:00
Denis Vlasenko
239369b368 Fix (hopefully) bug 976. Need more thorough audit.
Restore erroneously removed FEATURE_UDHCP_SYSLOG.
2006-09-07 17:05:44 +00:00
Denis Vlasenko
049d6b8c08 Add CONFIG_FEATURE_SYSLOG which controls whether
bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.
2006-09-07 06:02:39 +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
Denis Vlasenko
21afc7dc29 uuencode: common implementation for wget and uuencode (closing bug 694) 2006-09-03 15:49:40 +00:00
Denis Vlasenko
65113e8d97 zcip: bb_error_msg had stray newlines; small optimization in opt parsing 2006-09-03 12:31:59 +00:00
Denis Vlasenko
af906a3b6c zcip: minor fixes 2006-09-03 12:29:53 +00:00
Denis Vlasenko
a9abecd85e zcip: fix stdout/err versus syslog output.
Incomplete: xfunc() would not respect this. TODO.
2006-09-03 12:28:32 +00:00
Denis Vlasenko
65dbd8752b zcip: getopt -> bb_getopt_ulflags 2006-09-03 12:27:25 +00:00
Denis Vlasenko
60e3dd6016 zcip: convert lots of zero-initialized locals
in zcip_main() to statics in bss.
2006-09-03 12:26:06 +00:00
Denis Vlasenko
035aae5841 zcip: use xfunc() where appropriate 2006-09-03 12:23:56 +00:00
Denis Vlasenko
27af5a0dd3 replacing func() with xfunc() where appropriate 2006-09-03 12:21:59 +00:00
Denis Vlasenko
87d80dcc3e zcip: apply patch from
http://bugs.busybox.net/view.php?id=1005
      zcip does not claim another IP after defending
2006-09-03 12:20:36 +00:00
Denis Vlasenko
bcf4908e71 ping: bind -> xbind 2006-09-02 17:53:16 +00:00
Denis Vlasenko
e0b7f71d26 ping(6): use htons instead of SWAP_BE. 2006-09-02 16:57:59 +00:00
Denis Vlasenko
2cbe6e6eb2 ping: implement -I option 2006-09-02 16:17:30 +00:00
Denis Vlasenko
db7f2e5881 ping6: resolve interface name to number early.
gcc is more efficient at truncating int to int16
via cast, use that instead of &.
2006-09-02 16:16:23 +00:00
Denis Vlasenko
cb6874cc66 Sync ping and ping6 a bit, fix style and indentation. 2006-09-02 16:13:36 +00:00
Denis Vlasenko
d53dd3e627 Fix endianness issue in ping6 2006-09-02 16:11:44 +00:00
Bernhard Reutner-Fischer
bfbc4ebf40 - patch from Csaba Henk to make the "User-Agent" header field configurable. 2006-09-02 15:30:26 +00:00
Rob Landley
88621d7398 Svn 16007 broke the build under gcc 4.0.3. This fixes up some of the damage
(the e2fsprogs directory is too twisty and evil to easily fix, but I plan
to rewrite it anyway so I'll just bump that up in priority a bit).
2006-08-29 19:41:06 +00:00
Rob Landley
099ed50f91 Unbreak allbareconfig a bit. (The telnetd.c fix is a perfect example of why
applets which are a forest of #ifdefs are unmaintainable.)
2006-08-28 09:41:49 +00:00
Bernhard Reutner-Fischer
289e86a0a5 - typo s/ENABLE_WGET_LONG_OPTIONS/ENABLE_FEATURE_WGET_LONG_OPTIONS/g 2006-08-20 20:01:24 +00:00
Bernhard Reutner-Fischer
d591a360d3 - merge -r15463:15564 from busybox_scratch branch through these changesets:
------------------------------------------------------------------------
r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines

- use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert.
- use xchdir() since all is invain if it fails there anyways, supposedly

------------------------------------------------------------------------
r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines

- adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account.

------------------------------------------------------------------------
r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines

- partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save
s 144 bytes
   text    data     bss     dec     hex filename
 862434   10156  645924 1518514  172bb2 busybox.old
 862322   10156  645892 1518370  172b22 busybox
function                                             old     new   delta
z_len                                                  4       -      -4
textend                                                4       -      -4
part_nb                                                4       -      -4
insize                                                 4       -      -4
ifile_size                                             4       -      -4
do_link                                                4       -      -4
new_text                                              70      60     -10
ipaddr_list_link                                      33      23     -10
gzip_main                                            898     822     -76
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120)           Total: -120 bytes


------------------------------------------------------------------------
r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines

- remove useless global exports
function                                             old     new   delta
rpm_main                                             940    1601    +661
rpm_getstring                                        107     112      +5
rpm_getint                                           148     153      +5
loop_through_files                                   103     106      +3
fileaction_dobackup                                  115     113      -2
fileaction_list                                        5       -      -5
rpm_getcount                                          42       -     -42
extract_cpio_gz                                      161       -    -161
rpm_gettags                                          504       -    -504
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714)          Total: -40 bytes

   text    data     bss     dec     hex filename
 862322   10156  645892 1518370  172b22 busybox.old
 862290   10156  645892 1518338  172b02 busybox


------------------------------------------------------------------------
r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines

- shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s
emaphore stuff into single caller manually.
  stats:
function                                             old     new   delta
logMessage                                           395     427     +32
message                                             1245    1257     +12
opts                                                   -       4      +4
small                                                  1       -      -1
local_logging                                          4       -      -4
doRemoteLog                                            4       -      -4
circular_logging                                       4       -      -4
syslogd_main                                        1299    1285     -14
static.res                                            36      16     -20
.rodata                                           186650  186586     -64
static.line                                         1025       -   -1025
------------------------------------------------------------------------------
(add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136)        Total: -1088 bytes
cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,}
   text    data     bss     dec     hex filename
   3723     348    5242    9313    2461 sysklogd/syslogd.o.orig
   3697     348    4188    8233    2029 sysklogd/syslogd.o

==============================================================================
Overall bloatcheck for the changeset mentioned above:
function                                             old     new   delta
rpm_main                                             953    1608    +655
logMessage                                           395     427     +32
message                                             1245    1257     +12
opts                                                   -       4      +4
rpm_getstring                                        107     110      +3
rpm_getint                                           148     151      +3
loop_through_files                                   103     104      +1
small                                                  1       -      -1
fileaction_dobackup                                  115     113      -2
z_len                                                  4       -      -4
textend                                                4       -      -4
part_nb                                                4       -      -4
local_logging                                          4       -      -4
insize                                                 4       -      -4
ifile_size                                             4       -      -4
do_link                                                4       -      -4
doRemoteLog                                            4       -      -4
circular_logging                                       4       -      -4
fileaction_list                                        5       -      -5
new_text                                              70      60     -10
ipaddr_list_link                                      33      23     -10
clear_bufs                                            31      21     -10
syslogd_main                                        1287    1273     -14
builtin_help                                         190     176     -14
static.res                                            36      16     -20
builtin_source                                       229     199     -30
rpm_getcount                                          42       -     -42
gzip_main                                            842     786     -56
.rodata                                           227176  227112     -64
lash_main                                            609     527     -82
busy_loop                                           3883    3739    -144
extract_cpio_gz                                      155       -    -155
rpm_gettags                                          501       -    -501
static.line                                         1025       -   -1025
------------------------------------------------------------------------------
(add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221)     Total: -1511 bytes
2006-08-20 17:35:13 +00:00
Bernhard Reutner-Fischer
13068a4fdb - typo: s/optarg/nprobes_str; fixes segfault as reported by Raphael HUCK 2006-08-18 18:29:40 +00:00
Bernhard Reutner-Fischer
5bd2a4b6ce - remove last reminiscents of IN_BUSYBOX 2006-08-18 17:22:23 +00:00
Rob Landley
4640b05afd Bernhard Fischer pointed out some leftover debris needing cleanup. 2006-08-15 21:37:55 +00:00
Rob Landley
affb7a61a6 scripts/individual now builds 171 applets. Some of them may even work. :) 2006-08-05 00:41:39 +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
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
081e38483e Remove xcalloc() and convert its callers to xzalloc(). About half of them
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +00:00
Rob Landley
86b4d64aa3 These should have been part of 15767 too. 2006-08-03 17:58:17 +00:00
Rob Landley
280a264fb8 Attempt to fixup httpd.c to match svn 15767. 2006-08-03 17:49:15 +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"
581d4f36b3 Move declaration to be compatible with older gcc's. 2006-08-03 10:50:39 +00:00
Rob Landley
cae61e7ca4 Make a gcc 4.1 warning go away. 2006-08-01 00:30:26 +00:00
Mike Frysinger
91a339002a get rid of udhcp submenu 2006-07-24 07:35:52 +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
Rob Landley
afb94ecf2b Convert setuid/setgid users to xsetuid/xsetgid. 2006-07-16 08:06:34 +00:00
Rob Landley
c9c1a41c58 A couple things that got tangled up in my tree, easier to check in both than
untangle them:

Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them).  (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)

Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
"Robert P. J. Day"
2819f757ca Add one-line GPL boilerplate to these source files. 2006-07-11 11:32:31 +00:00
Rob Landley
1cca9484db Upgrade netcat a lot. Make -e able to take the rest of the command line as
what to exec.  Add -f mode and a brief explanation of how to use it to replace
minicom.  Add -l -l mode so you can turn any command into a server.  And group
all of netcat's command line options under two CONFIG entries, so if you
disable both it doesn't use getopt at all.
2006-07-10 19:45:20 +00:00
"Robert P. J. Day"
cf5b80ba32 This file doesn't appear to be used anywhere. 2006-07-05 12:47:26 +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"
d35ef0f666 More removal of "#if 0" content. 2006-07-01 14:59:54 +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
00c051e42d Bug http://bugs.busybox.net/view.php?id=723 - initialize tv1 the first time
through the loop.
2006-06-30 14:05:19 +00:00
Rob Landley
af12cb39d1 Patch from Geoff Baker to fix bug http://bugs.busybox.net/view.php?id=905 by
changing wget's ftp code not to chdir but to use the complete path each time.
2006-06-27 18:41:03 +00:00
"Robert P. J. Day"
21302c2b78 Properly print the output for a sit (IPv6-in-IPv4) interface. 2006-06-26 22:03:43 +00:00
"Robert P. J. Day"
4137dd783b Aesthetic fix to use newer structure initialization format. 2006-06-26 21:54:57 +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
53433b3ca1 Clean up. 2006-06-22 22:28:29 +00:00
Rob Landley
67d4943393 CONFIG_DHCP -> CONFIG_APP_DHCP. 2006-06-22 18:48:34 +00:00
Mike Frysinger
b049c0ec19 only enable count_bit functions when actually needed to fix warning reported by Bernhard Fischer 2006-06-20 23:03:27 +00:00
Rob Landley
9fe801e0d2 Patch by Robert P. Day to remove obsolete alias code that the 2.4 and 2.6
Linux kernels don't do anymore.
2006-06-20 21:13:29 +00:00
Rob Landley
2818b292fb Patch by Robert P. Day to make structs use c99 initializers. 2006-06-20 15:52:52 +00:00
Rob Landley
2a613d7360 Patch from Robert P. J. Day cleaning up some unnecessary preprocessor
directives.
2006-06-20 14:57:00 +00:00
Rob Landley
7a260f01ce Make some 64 bit warnings go away on x86-64. 2006-06-19 03:20:03 +00:00
Rob Landley
ea224be6aa skip_whitespace() shouldn't claim its return value is const, it doesn't know
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +00:00
Rob Landley
14d7065ef1 Make this slightly more readable, and expose the hypocrasy of a comment that
says "our implementation makes it impossible to use blocksizes smaller than
22 octets" right above a check for blocksize < 8.
2006-06-18 15:23:13 +00:00
Bernhard Reutner-Fischer
fd4b61d5f3 - add needed includes and include busybox.h needed for the ATTRIBUTE define. 2006-06-16 12:28:39 +00:00
Bernhard Reutner-Fischer
597e70e9e4 - rename CONFIG_FEATURE_TFTP_DEBUG to CONFIG_DEBUG_TFTP 2006-06-14 17:32:11 +00:00
Bernhard Reutner-Fischer
32bf1f9d42 - rename CONFIG_FEATURE_TFTP_DEBUG to CONFIG_DEBUG_TFTP so it's off in defconfig
- expand the cmd_get/cmd_put macros
- Jason Schoon writes: unlink only if non-stdio
2006-06-14 17:29:10 +00:00
Bernhard Reutner-Fischer
f1bd42a305 - correct typo 2006-06-14 16:51:50 +00:00
Rob Landley
575c8bacda Don't break allbareconfig. 2006-06-13 21:30:09 +00:00
Rob Landley
19a3940f15 Patch from Denis Vlasenko:
* Rename a var: statbytes -> transferred
* cursize == transferred, always. Nuke cursize.
* Make progressmeter() a nop if !CONFIG_FEATURE_WGET_STATUSBAR
  (reduces #ifdef forest)
* double elapsed -> int elapsed
* Do not sprintf to buf first and then write(STDERR) it,
  just fprintf directly to stderr
* Progress bar printing code made smaller
* Style fixes
2006-06-13 17:10:26 +00:00
Rob Landley
76ef08c5e3 Whitespace cleanup from Denis Vlasenko. 2006-06-13 16:44:26 +00:00
Bernhard Reutner-Fischer
62f9856f54 - revert incorrect select change 2006-06-10 14:32:56 +00:00
Bernhard Reutner-Fischer
b25f98a417 - fix two segfaults (reported by Horst Kronstorfer)
- remove dangling file if get fails (spotted and fixed by Jason Schoon)
- shrink it (Bernhard Fischer)
Thanks, all!
   text	   data	    bss	    dec	    hex	filename
   2684	      0	      0	   2684	    a7c	networking/tftp.o.orig
   2748	      0	      0	   2748	    abc	networking/tftp.o.allfixed
   2666	      0	      0	   2666	    a6a	networking/tftp.o.+shrink
2006-06-10 14:15:03 +00:00
Bernhard Reutner-Fischer
3b1936dcf9 - use bb_xbind
Thanks Erik Hovland
2006-06-10 11:39:09 +00:00
Bernhard Reutner-Fischer
19008b8373 - reuse strings and messages. Saves about 600B 2006-06-07 20:17:41 +00:00
Mike Frysinger
830d258dee use bb_xbind/bb_xlisten 2006-06-07 20:06:24 +00:00
Bernhard Reutner-Fischer
e0387a6ee8 - fix the build if we have ftpput without ftpget (speeling reeoe)
Thanks to Stephane Billiart
2006-06-07 13:31:59 +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
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
Rob Landley
e84f4343b2 Remove #ifdeffed out code, both KEEP_UNUSED and #if 0. 2006-06-03 21:23:20 +00:00
Rob Landley
ecae66ac16 Header cleanup: don't #include headers that libbb.h already includes. 2006-06-02 20:53:38 +00:00
Rob Landley
ff97ee9abd #ifdef reduction. 2006-06-02 19:03:01 +00:00
Rob Landley
9b1857f79f Bugfix from Shaun Jackman: don't attempt to write 64 bytes and then fail if
the write wasn't 192 bytes long.
2006-05-31 23:54:50 +00:00
Rob Landley
c8b360ebb7 Use BB endianness macro. 2006-05-31 22:24:33 +00:00
Bernhard Reutner-Fischer
8d3a6f7aaf - add CONFIG_FEATURE_WGET_LONG_OPTIONS 2006-05-31 14:11:38 +00:00
Bernhard Reutner-Fischer
c418d482ba - s/defined(__uClinux__)/BB_NOMMU/
This needs a second pass to:
+ add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag)
+ eventually globally export argc and argv, so we don't need to pass it to
  bb_daemon().
2006-05-31 10:19:51 +00:00
Rob Landley
1ec5b29054 More size shrinkage. 2006-05-29 07:42:02 +00:00
Rob Landley
a6e131dab3 Size reductions, mostly switching things to use libbb functions. 2006-05-29 06:43:55 +00:00
Rob Landley
4e3aff3425 Remove _(). 2006-05-29 04:37:28 +00:00
Rob Landley
3f78561d63 My first bout of untangling udhcp. Make lots of gratuitous #defines go
away, substitutie BB_VER for an external VERSION, use busybox CONFIG symbols
rather than checking for them then defining others, etc.  Lots more cleanup
to do...
2006-05-28 01:06:36 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +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
Mike Frysinger
fa6c4844b2 fix spelling mistakes 2006-05-26 01:48:17 +00:00
Rob Landley
6cd2250953 Remove a pointless #define. 2006-05-25 18:31:11 +00:00
Rob Landley
9ffd42317b Minor cleanups: Convert a few calloc() calls to xzalloc, remove unnecessary
memset, collate variable declarations...
2006-05-21 18:30:35 +00:00
Rob Landley
9b5a99ad21 Patch from Robert P. Day to remove #ifdefed out SLIP support code that we
have no CONFIG option to enable, and which existing SLIP users don't seem
to miss.
2006-05-19 22:54:42 +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
0a8812bdc5 - replace _PATH_DEVNULL with bb_dev_null 2006-05-19 13:12:21 +00:00
Bernhard Reutner-Fischer
a2a647dfc1 - include strings.h
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Bernhard Reutner-Fischer
e2e56c7c41 - single KERNEL_VERSION(a,b,c) macro in platform.h
- rename get_kernel_revision() to get_linux_version_code
from Robert P. J. Day
2006-05-19 11:54:02 +00:00
Rob Landley
7723019c6b Patch from Bernhard Fischer to remove some useless bits. 2006-05-17 20:24:53 +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
Mike Frysinger
e135a5d746 fix no previous prototype warning 2006-05-11 02:36:51 +00:00
Mike Frysinger
b5547fb0b3 fix no previous prototype warning 2006-05-11 02:35:55 +00:00
Mike Frysinger
49f6afc0a0 rename 2006-05-11 02:10:13 +00:00