oweals/busybox.git
17 years agodo not expose internal state of [g]zip unpacker.
Denis Vlasenko [Fri, 5 Jan 2007 23:56:53 +0000 (23:56 -0000)]
do not expose internal state of [g]zip unpacker.
fix memory leak in inflate_gunzip.

17 years agoStopped doing assignments inside expressions.
Denis Vlasenko [Fri, 5 Jan 2007 19:49:02 +0000 (19:49 -0000)]
Stopped doing assignments inside expressions.
Who wrote this gem, I wonder?

n -= (e = (e = gunzip_wsize - ((d &= gunzip_wsize - 1) > w ? d : w)) > n ? n : e);

17 years agodecompress_unzip: preparatory patch
Denis Vlasenko [Fri, 5 Jan 2007 19:46:04 +0000 (19:46 -0000)]
decompress_unzip: preparatory patch

17 years agoStop tracking buffer size - it is a constant.
Denis Vlasenko [Fri, 5 Jan 2007 14:04:47 +0000 (14:04 -0000)]
Stop tracking buffer size - it is a constant.
Stop ignoring write errors.
Fix bugs in this line:
rc->buffer_size = read(rc->fd, RC_BUFFER, rc->buffer_size);
(a) should use safe_read()
(b) just ONE short read (e.g. 4 bytes) will make ALL future reads short!

17 years agosimplify access to buffer, making code a bit smaller
Denis Vlasenko [Fri, 5 Jan 2007 13:59:05 +0000 (13:59 -0000)]
simplify access to buffer, making code a bit smaller

17 years ago- remove duplicate includes
Bernhard Reutner-Fischer [Thu, 4 Jan 2007 22:13:25 +0000 (22:13 -0000)]
- remove duplicate includes

17 years agosyslogd: start using bb_common_bufsiz1 instead of stack/malloc
Denis Vlasenko [Thu, 4 Jan 2007 21:22:11 +0000 (21:22 -0000)]
syslogd: start using bb_common_bufsiz1 instead of stack/malloc
logger: optimize, also use bb_common_bufsiz1 (~40 bytes)
tested to eat arbitrarily-sized input at high speed - ok

17 years agosyslogd: stop doing open/fstat/lseek/close on _every_ write
Denis Vlasenko [Thu, 4 Jan 2007 18:02:32 +0000 (18:02 -0000)]
syslogd: stop doing open/fstat/lseek/close on _every_ write
(still doing it if more than a second passed in between).
Costs ~40 bytes.

17 years agonew libbb func: xmalloc_realpath (+ use it where makes sense)
Denis Vlasenko [Thu, 4 Jan 2007 17:59:59 +0000 (17:59 -0000)]
new libbb func: xmalloc_realpath (+ use it where makes sense)
syslogd, logread: add debugging code (disabled)
syslogs: drastically smaller bss; fix "-C n" behaviour

17 years agosyslogd: almost rewritten. Had several obvious bugs...
Denis Vlasenko [Thu, 4 Jan 2007 17:57:54 +0000 (17:57 -0000)]
syslogd: almost rewritten. Had several obvious bugs...

17 years ago- spelling fix
Bernhard Reutner-Fischer [Thu, 4 Jan 2007 15:44:49 +0000 (15:44 -0000)]
- spelling fix

17 years agoklogd: small optimizations
Denis Vlasenko [Thu, 4 Jan 2007 03:07:57 +0000 (03:07 -0000)]
klogd: small optimizations
(btw, I looked into syslogd... that's frightening!)

17 years agofix allnoconfig build. the most useful fix of the month. ;)
Denis Vlasenko [Wed, 3 Jan 2007 23:23:58 +0000 (23:23 -0000)]
fix allnoconfig build. the most useful fix of the month. ;)
[spotted by Bernhard Fischer <rep.nop@aon.at>]

17 years agohttpd: read cgi output with full_read, not safe_read
Denis Vlasenko [Wed, 3 Jan 2007 23:02:18 +0000 (23:02 -0000)]
httpd: read cgi output with full_read, not safe_read
(avoids mangling of HTTP headers)

17 years agowget: always print port# in 'Host' header (smaller code)
Denis Vlasenko [Wed, 3 Jan 2007 22:29:01 +0000 (22:29 -0000)]
wget: always print port# in 'Host' header (smaller code)

17 years agoping[6]: don't do htons(a++), it can be a macro
Denis Vlasenko [Wed, 3 Jan 2007 22:14:18 +0000 (22:14 -0000)]
ping[6]: don't do htons(a++), it can be a macro

17 years agowget: print port# in 'Host' header, if different from 80
Denis Vlasenko [Wed, 3 Jan 2007 22:09:26 +0000 (22:09 -0000)]
wget: print port# in 'Host' header, if different from 80

17 years agoftpgetput: fix PASV mode, fix xatou0induced breakage,
Denis Vlasenko [Wed, 3 Jan 2007 21:55:50 +0000 (21:55 -0000)]
ftpgetput: fix PASV mode, fix xatou0induced breakage,
improve error message, guard against garbage from remote server
being printed. ~20 bytes code growth

17 years agochown: fix handling of "user.group" notation
Denis Vlasenko [Wed, 3 Jan 2007 20:07:06 +0000 (20:07 -0000)]
chown: fix handling of "user.group" notation

17 years agofind: fix misplaced #else (fix by Harald Kuthe <trhoudini@hotmail.com>)
Denis Vlasenko [Wed, 3 Jan 2007 03:15:58 +0000 (03:15 -0000)]
find: fix misplaced #else (fix by Harald Kuthe <trhoudini@hotmail.com>)

17 years agofdisk: remove 8k buffer from bss - OSF labels
Denis Vlasenko [Wed, 3 Jan 2007 02:58:54 +0000 (02:58 -0000)]
fdisk: remove 8k buffer from bss - OSF labels
are not THAT common anyway

17 years agoconvert calloc to xzalloc
Denis Vlasenko [Wed, 3 Jan 2007 02:56:00 +0000 (02:56 -0000)]
convert calloc to xzalloc
fix sleep-on-die option

17 years agoextern variable declaration in a .c file is heresy - fixing it
Denis Vlasenko [Wed, 3 Jan 2007 01:57:25 +0000 (01:57 -0000)]
extern variable declaration in a .c file is heresy - fixing it

17 years agofsck_minix: tiny optimization
Denis Vlasenko [Wed, 3 Jan 2007 01:36:42 +0000 (01:36 -0000)]
fsck_minix: tiny optimization

17 years agoforgot to svn add util-linux/minix.h :(
Denis Vlasenko [Wed, 3 Jan 2007 00:47:47 +0000 (00:47 -0000)]
forgot to svn add util-linux/minix.h :(

17 years agofbset: move variable from data to bss
Denis Vlasenko [Wed, 3 Jan 2007 00:45:05 +0000 (00:45 -0000)]
fbset: move variable from data to bss
fsck_minix: fix fallout

17 years agofactor out minix structures/constants into minix.h
Denis Vlasenko [Wed, 3 Jan 2007 00:43:19 +0000 (00:43 -0000)]
factor out minix structures/constants into minix.h
fsck_minix: optimizations

17 years agofsck_minix: optimizations. ~130 bytes
Denis Vlasenko [Wed, 3 Jan 2007 00:41:53 +0000 (00:41 -0000)]
fsck_minix: optimizations. ~130 bytes

17 years agointroduce small[u]int
Denis Vlasenko [Wed, 3 Jan 2007 00:39:15 +0000 (00:39 -0000)]
introduce small[u]int
fsck_minix: use it for flag variables. 140 bytes saved

17 years agosilly style fixes
Denis Vlasenko [Tue, 2 Jan 2007 16:45:05 +0000 (16:45 -0000)]
silly style fixes

17 years agoRemove networking/libiproute/linux/pkt_sched.h
Denis Vlasenko [Tue, 2 Jan 2007 16:32:16 +0000 (16:32 -0000)]
Remove networking/libiproute/linux/pkt_sched.h
(and networking/libiproute/linux/ since it become empty).
Style fixes.

17 years agostr2u() is only used when FEATURE_SORT_BIG is enabled
Mike Frysinger [Tue, 2 Jan 2007 05:43:30 +0000 (05:43 -0000)]
str2u() is only used when FEATURE_SORT_BIG is enabled

17 years agoconvert usage compressed command into the new cmd style
Mike Frysinger [Tue, 2 Jan 2007 05:42:35 +0000 (05:42 -0000)]
convert usage compressed command into the new cmd style

17 years agoawk: style fixes
Denis Vlasenko [Mon, 1 Jan 2007 23:53:52 +0000 (23:53 -0000)]
awk: style fixes

17 years agoawk: undo locale setting for numbers - or else parsing
Denis Vlasenko [Mon, 1 Jan 2007 23:53:12 +0000 (23:53 -0000)]
awk: undo locale setting for numbers - or else parsing
can act quite mysteriously
date: add if(ENABLE_LOCALE_SUPPORT)

17 years agoawk: style cleanup. A lot of rw data moved to ro
Denis Vlasenko [Mon, 1 Jan 2007 23:51:30 +0000 (23:51 -0000)]
awk: style cleanup. A lot of rw data moved to ro
(still has quite a lot of statics etc...).
getopt32-ification.

17 years agostty: fix width of a field for ppc32
Denis Vlasenko [Mon, 1 Jan 2007 18:18:04 +0000 (18:18 -0000)]
stty: fix width of a field for ppc32
sort: fix -u to match coreutils 6.3
msh: compile fix (my fault)

17 years agomsh: double "static char line[LINELIM]" etc deleted.
Denis Vlasenko [Mon, 1 Jan 2007 06:00:38 +0000 (06:00 -0000)]
msh: double "static char line[LINELIM]" etc deleted.
massive amounts of assignments-in-ifs deleted
(some of which were VERY nasty)

17 years agort_names: stop allocating 5k in rwdata
Denis Vlasenko [Sun, 31 Dec 2006 20:40:20 +0000 (20:40 -0000)]
rt_names: stop allocating 5k in rwdata
objsizes: don't show build machinery's object modules

17 years agoless: fix <tab><backspace> buglet
Denis Vlasenko [Sun, 31 Dec 2006 19:36:01 +0000 (19:36 -0000)]
less: fix <tab><backspace> buglet

17 years agoless: interpret backspace.
Denis Vlasenko [Sun, 31 Dec 2006 19:23:31 +0000 (19:23 -0000)]
less: interpret backspace.
less is officially declared PAGER-capable! ;)
(this includes viewing of manpages)

17 years agoiproute: remove double get_hz optimization
Denis Vlasenko [Sun, 31 Dec 2006 19:07:23 +0000 (19:07 -0000)]
iproute: remove double get_hz optimization

17 years agoremove commented out #includes etc
Denis Vlasenko [Sun, 31 Dec 2006 18:58:32 +0000 (18:58 -0000)]
remove commented out #includes etc
move get_hz to the only caller

17 years agostop using __u32 etc. uint32_t is there for a reason
Denis Vlasenko [Sun, 31 Dec 2006 18:57:37 +0000 (18:57 -0000)]
stop using __u32 etc. uint32_t is there for a reason

17 years agofixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
Denis Vlasenko [Sun, 31 Dec 2006 12:14:16 +0000 (12:14 -0000)]
fixes from Yann E. MORIN <yann.morin.1998@anciens.enib.fr>

17 years agoconvert include/autoconf.h split and include/bbconfigopts.h commands into the new...
Mike Frysinger [Sun, 31 Dec 2006 11:46:19 +0000 (11:46 -0000)]
convert include/autoconf.h split and include/bbconfigopts.h commands into the new cmd style

17 years agoYann E. MORIN. writes: i pity the fool who doesnt use the z length modifier with...
Mike Frysinger [Sun, 31 Dec 2006 11:34:17 +0000 (11:34 -0000)]
Yann E. MORIN. writes: i pity the fool who doesnt use the z length modifier with size_t types

17 years agoabout.html: update maintainer name
Denis Vlasenko [Sat, 30 Dec 2006 22:03:02 +0000 (22:03 -0000)]
about.html: update maintainer name
libbb/Kbuild: less needs xregcomp.o

17 years agofixdep.c: avoit doing memcmp in most cases
Denis Vlasenko [Sat, 30 Dec 2006 21:11:57 +0000 (21:11 -0000)]
fixdep.c: avoit doing memcmp in most cases
uidgid_get.c: add forgotten copyright notice
pwd/grp/shadow: avoid collisions with libc names

17 years agosaw commit of vapier@busybox.net (thanks!),
Denis Vlasenko [Sat, 30 Dec 2006 19:52:28 +0000 (19:52 -0000)]
saw commit of vapier@busybox.net (thanks!),
decided to stop doing FOUR memcmp's per each input character.
I should have fixed this much earlier...

17 years agokill off AUTOCONF_INCLUDED (again) since it tends to get into cat fights with the...
Mike Frysinger [Sat, 30 Dec 2006 19:46:38 +0000 (19:46 -0000)]
kill off AUTOCONF_INCLUDED (again) since it tends to get into cat fights with the kernel headers

17 years agomake sure AUTOCONF_TIMESTAMP is filled up properly ... if user has a timezone of...
Mike Frysinger [Sat, 30 Dec 2006 19:43:35 +0000 (19:43 -0000)]
make sure AUTOCONF_TIMESTAMP is filled up properly ... if user has a timezone of Factory for example, strftime() will overflow the string and leave us without a trailing "\n and all hell breaks loose when we compile

17 years agoprevent buffer underflows with empty lines
Mike Frysinger [Sat, 30 Dec 2006 19:30:20 +0000 (19:30 -0000)]
prevent buffer underflows with empty lines

17 years agoprevent accessing memory that we dont own
Mike Frysinger [Sat, 30 Dec 2006 19:21:48 +0000 (19:21 -0000)]
prevent accessing memory that we dont own

17 years agonext bunch of fixes for bugs found by randconfig
Denis Vlasenko [Sat, 30 Dec 2006 18:42:29 +0000 (18:42 -0000)]
next bunch of fixes for bugs found by randconfig

17 years agodone a dozen of randconfig test. guess what? ALL failed...
Denis Vlasenko [Sat, 30 Dec 2006 17:57:03 +0000 (17:57 -0000)]
done a dozen of randconfig test. guess what? ALL failed...
these are resulting fixes

17 years agofix for uclibc-without-shadow.h compilation
Denis Vlasenko [Sat, 30 Dec 2006 14:46:51 +0000 (14:46 -0000)]
fix for uclibc-without-shadow.h compilation

17 years agowe need to use the compiler driver to invoke LD as LDFLAGS is in the form the compile...
Mike Frysinger [Fri, 29 Dec 2006 23:27:22 +0000 (23:27 -0000)]
we need to use the compiler driver to invoke LD as LDFLAGS is in the form the compiler driver understands, not the form the linker itself understands, so trying to invoke ld directly and passing it LDFLAGS while invoking the compiler driver in other places and passing it LDFLAGS does not work

17 years agoAdd link to post-1.3.1 patches to website
Denis Vlasenko [Thu, 28 Dec 2006 21:44:43 +0000 (21:44 -0000)]
Add link to post-1.3.1 patches to website

17 years ago* precision requires the argument be an integer, not size_t
Mike Frysinger [Thu, 28 Dec 2006 21:41:09 +0000 (21:41 -0000)]
* precision requires the argument be an integer, not size_t

17 years agofix build without shadow support
Denis Vlasenko [Thu, 28 Dec 2006 21:33:30 +0000 (21:33 -0000)]
fix build without shadow support

17 years agobb_xget[pw/gr]nam were horribly misnamed - fixed.
Denis Vlasenko [Thu, 28 Dec 2006 05:44:47 +0000 (05:44 -0000)]
bb_xget[pw/gr]nam were horribly misnamed - fixed.
uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam

17 years agonews.html: Fix bad English
Denis Vlasenko [Wed, 27 Dec 2006 09:47:53 +0000 (09:47 -0000)]
news.html: Fix bad English

17 years agofix typo
Denis Vlasenko [Wed, 27 Dec 2006 07:57:29 +0000 (07:57 -0000)]
fix typo

17 years agoAnnounce 1.3.1
Denis Vlasenko [Wed, 27 Dec 2006 05:06:27 +0000 (05:06 -0000)]
Announce 1.3.1

17 years agoash: is_safe_applet mustn't affect disabled applets
Denis Vlasenko [Tue, 26 Dec 2006 21:31:11 +0000 (21:31 -0000)]
ash: is_safe_applet mustn't affect disabled applets

17 years agomerge post-1.3.0 fixes
Denis Vlasenko [Tue, 26 Dec 2006 18:17:42 +0000 (18:17 -0000)]
merge post-1.3.0 fixes

17 years agoproperly export externs thru *.h files
Denis Vlasenko [Tue, 26 Dec 2006 17:40:33 +0000 (17:40 -0000)]
properly export externs thru *.h files

17 years agoadduser: trivial code movement
Denis Vlasenko [Tue, 26 Dec 2006 17:37:38 +0000 (17:37 -0000)]
adduser: trivial code movement

17 years agostyle fixes
Denis Vlasenko [Tue, 26 Dec 2006 10:42:51 +0000 (10:42 -0000)]
style fixes
last xcalloc replaced by xzalloc

17 years agochattr: bugfixes and size reduction
Denis Vlasenko [Tue, 26 Dec 2006 03:36:28 +0000 (03:36 -0000)]
chattr: bugfixes and size reduction

17 years agotrivial size reduction
Denis Vlasenko [Tue, 26 Dec 2006 03:02:25 +0000 (03:02 -0000)]
trivial size reduction

17 years agoleftover of e2fsck surgery
Denis Vlasenko [Tue, 26 Dec 2006 02:51:29 +0000 (02:51 -0000)]
leftover of e2fsck surgery

17 years agoput small subset of e2fsprogs back in the tree:
Denis Vlasenko [Tue, 26 Dec 2006 01:30:59 +0000 (01:30 -0000)]
put small subset of e2fsprogs back in the tree:
lsattr, chattr, fsck. Old e2fsprogs tree is in
e2fsprogs/old_e2fsprogs/*.

17 years agoremove e2fsprogs. Nobody volunteered to clean up that mess
Denis Vlasenko [Tue, 26 Dec 2006 01:25:48 +0000 (01:25 -0000)]
remove e2fsprogs. Nobody volunteered to clean up that mess

17 years agoFix irregular capitalization in usage texts
Denis Vlasenko [Mon, 25 Dec 2006 15:10:32 +0000 (15:10 -0000)]
Fix irregular capitalization in usage texts

17 years agotrim help texts a bit more
Denis Vlasenko [Mon, 25 Dec 2006 14:25:14 +0000 (14:25 -0000)]
trim help texts a bit more

17 years agoless: fix regexp search '/' on large files
Denis Vlasenko [Mon, 25 Dec 2006 01:23:02 +0000 (01:23 -0000)]
less: fix regexp search '/' on large files

17 years agomore usage message cleanups
Denis Vlasenko [Sun, 24 Dec 2006 17:40:16 +0000 (17:40 -0000)]
more usage message cleanups

17 years agoCleanup usage messages (-200 bytes).
Denis Vlasenko [Sun, 24 Dec 2006 16:59:27 +0000 (16:59 -0000)]
Cleanup usage messages (-200 bytes).
Remove busybox_main from applet table since
it is called via separate check

17 years agorandom tiny size savings
Denis Vlasenko [Sun, 24 Dec 2006 15:23:28 +0000 (15:23 -0000)]
random tiny size savings

17 years agosmall stupid changes. no code changes
Denis Vlasenko [Sun, 24 Dec 2006 07:30:09 +0000 (07:30 -0000)]
small stupid changes. no code changes

17 years agomissing piece of prev commit: ndelay_off
Denis Vlasenko [Sun, 24 Dec 2006 07:15:50 +0000 (07:15 -0000)]
missing piece of prev commit: ndelay_off

17 years agoless: implement waiting for input using select(). Rather tricky business.
Denis Vlasenko [Sun, 24 Dec 2006 07:14:17 +0000 (07:14 -0000)]
less: implement waiting for input using select(). Rather tricky business.
But we do not read entire input anymore up-front.

17 years agosum: 40% size reduction (-300 bytes)
Denis Vlasenko [Sat, 23 Dec 2006 15:58:11 +0000 (15:58 -0000)]
sum: 40% size reduction (-300 bytes)
find: one_char -> LONE_CHAR

17 years agosu: fix typo: "argv -= optind" should be +=
Denis Vlasenko [Sat, 23 Dec 2006 02:59:06 +0000 (02:59 -0000)]
su: fix typo: "argv -= optind" should be +=

17 years agouse xbind, xconnect where appropriate.
Denis Vlasenko [Sat, 23 Dec 2006 02:48:44 +0000 (02:48 -0000)]
use xbind, xconnect where appropriate.
small edits to arping

17 years ago#define FEATURE_GETUSERNAME_AND_HOMEDIR should be always #defined
Denis Vlasenko [Sat, 23 Dec 2006 01:21:55 +0000 (01:21 -0000)]
#define FEATURE_GETUSERNAME_AND_HOMEDIR should be always #defined

17 years agofix recognitions of -SIGname signals
Denis Vlasenko [Sat, 23 Dec 2006 01:06:21 +0000 (01:06 -0000)]
fix recognitions of -SIGname signals
(fix by Jacques LUDER <jacques.luder@thalesgroup.com>)

17 years agofind: fix spurious -exec error messages
Denis Vlasenko [Sat, 23 Dec 2006 00:49:10 +0000 (00:49 -0000)]
find: fix spurious -exec error messages
(bug reported by Bernhard Fischer <rep.nop@aon.at>)

17 years agoremove useless casts (type*) xzalloc(...)
Denis Vlasenko [Fri, 22 Dec 2006 18:37:07 +0000 (18:37 -0000)]
remove useless casts (type*) xzalloc(...)

17 years agodpkg: getopt32-ification etc, -100 bytes
Denis Vlasenko [Fri, 22 Dec 2006 18:32:40 +0000 (18:32 -0000)]
dpkg: getopt32-ification etc, -100 bytes

17 years agotail: -50 text bytes
Denis Vlasenko [Fri, 22 Dec 2006 16:06:16 +0000 (16:06 -0000)]
tail: -50 text bytes

17 years agorpm: reformat. was really hard to read
Denis Vlasenko [Fri, 22 Dec 2006 15:03:50 +0000 (15:03 -0000)]
rpm: reformat. was really hard to read

17 years agoconvert "negaite" config option into reversed (INCLUDE_SUSv2)
Denis Vlasenko [Fri, 22 Dec 2006 13:56:36 +0000 (13:56 -0000)]
convert "negaite" config option into reversed (INCLUDE_SUSv2)

17 years agotime: -200 bytes of text
Denis Vlasenko [Fri, 22 Dec 2006 13:43:19 +0000 (13:43 -0000)]
time: -200 bytes of text

17 years agotime: fix option parsing bug, size optimizations
Denis Vlasenko [Fri, 22 Dec 2006 12:36:13 +0000 (12:36 -0000)]
time: fix option parsing bug, size optimizations

17 years agoAlways use /usr/share/udhcpc/default.script ([/usr] was depending on CONFIG_xx)
Denis Vlasenko [Fri, 22 Dec 2006 11:47:19 +0000 (11:47 -0000)]
Always use /usr/share/udhcpc/default.script ([/usr] was depending on CONFIG_xx)

17 years agoremoval of commented-out cruft
Denis Vlasenko [Fri, 22 Dec 2006 00:45:27 +0000 (00:45 -0000)]
removal of commented-out cruft

17 years agotar et al: die if bb_copyfd_size copies less than asked for.
Denis Vlasenko [Fri, 22 Dec 2006 00:21:07 +0000 (00:21 -0000)]
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)