Commit Graph

49 Commits

Author SHA1 Message Date
Denis Vlasenko
703e20235a cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED",
removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22 14:12:08 +00:00
Denis Vlasenko
35d4da0fb5 exterminate u_intXXX.
fix ping6 buglet (memset is too short), minor sync between ping and ping6
2007-01-22 14:04:27 +00:00
Denis Vlasenko
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
4cccc03768 remove useless casts (type*) xzalloc(...) 2006-12-22 18:37:07 +00:00
Denis Vlasenko
28703015ab u_short, ulong exterminated
fdiskXXX: add a bit of sanity (not enough by far)
2006-12-19 20:32:02 +00:00
Denis Vlasenko
48237b0c88 introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
2006-11-22 23:22:06 +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
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +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
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
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
Bernhard Reutner-Fischer
13068a4fdb - typo: s/optarg/nprobes_str; fixes segfault as reported by Raphael HUCK 2006-08-18 18:29:40 +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
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
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
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Mike Frysinger
f8346038e9 kill off pointless malloc.h include 2006-04-16 21:17:00 +00:00
Mike Frysinger
b66c931fad kill pointless memory.h includes 2006-04-16 21:15:42 +00:00
Bernhard Reutner-Fischer
67f641e75b - patch from Denis Vlasenko to add bb_xbind() and bb_xlisten() 2006-04-12 18:24:37 +00:00
Bernhard Reutner-Fischer
dac7ff15b7 - patch from Denis Vlasenko to add and use bb_xsocket() and to use
bb_xopen some more while at it.
  Also use shorter boilerplate while at it.
2006-04-12 17:55:51 +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
Mike Frysinger
294254ce6b rfelker writes in Bug 740: s/u_char/unsigned char/ 2006-02-19 22:59:12 +00:00
Bernhard Reutner-Fischer
9f4a1e1c75 - add and use ATTRIBUTE_ALIGNED(num_bytes)
- remove unused parameter pindex from fdisk.c, xbsd_initlabel()
2006-01-31 09:53:53 +00:00
Eric Andersen
0cb6f35c33 fix up annoying signed/unsigned and mixed type errors 2006-01-30 22:30:41 +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"
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"
6c35c7c976 usage bb_dev_null 2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
45a8ed89c6 - sync traceroute with Slackware-10.1
(support -FIl -g gw -i if -z pt now).
- libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
2005-09-06 16:08:33 +00:00
Mike Frysinger
66c37d1390 typecast to int 2005-07-31 22:22:20 +00:00
Paul Fox
28069404a4 much more concise fix for bug #45. just align the packet... 2005-07-20 11:55:08 +00:00
Paul Fox
b270315b21 applying fix for:
0000045: traceroute causes an alignment trap due to unaligned buffer on arm
2005-07-19 20:37:15 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
85e5e72bc1 Remove remaining libc5 support code 2003-07-22 08:56:55 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Aaron Lehmann
7dd2cec2fd ansify 2002-08-23 07:52:58 +00:00
Aaron Lehmann
69d4178708 Remove advertising clauses in accordance with
ftp://ftp.cs.berkeley.edu/ucb/4bsd/README.Impt.License.Change
2002-06-23 22:25:24 +00:00
Eric Andersen
ad79c0b629 Patch from Gyepi SAM <gyepi@praxis-sw.com>:
Fixed up domain removal for local domains. GNU traceroute does not do this. I
don't know why we do.  Fixed incorrect argument for reverse resolution.  Clean
up cruft that appears when CONFIG_FEATURE_TRACEROUTE_VERBOSE is defined
2002-06-06 12:24:51 +00:00
Eric Andersen
cd8c436d81 Latest patch from vodz:
-- reverse resolve network name and cache in route and ifconfig
	applets, fix print nslookup server name if compile without
	uClibc, fix route crashe 'route add', fix warnings compile
	networking and pwd_grp applets
2001-11-10 11:22:46 +00:00
Eric Andersen
bdfd0d78bc Major rework of the directory structure and the entire build system.
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
be0c36009a More libc5 fixups
-Erik
2001-08-02 10:55:32 +00:00
Eric Andersen
af6b40a1ea Silence some silly warnings 2001-07-31 22:53:36 +00:00
Eric Andersen
044228d5ec This is vodz' latest patch. Sorry it took so long...
1) ping cleanup (compile fix from this patch already applied).
    2) traceroute call not spare ntohl() now (and reduce size);
    3) Fix for functions not declared static in insmod, ash, vi and mount.
    4) a more simple API cmdedit :))
    5) adds "stopped jobs" warning to ash on Ctrl-D and fixes "ignoreeof" option
    6) reduce exporting library function index->strchr (traceroute), bzero->memset (syslogd)
2001-07-17 01:12:36 +00:00
Eric Andersen
7467c8d3b6 Patch from vodz:
Changed email address
    cmdedit API change
    optimizations for traceroute and md5sum
    added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Eric Andersen
5c58d283bb A traceroute applet from vodz. This could probably be slimmed down,
but will do for now...
2001-07-10 16:29:00 +00:00