Denis Vlasenko
2405ad659e
ls: use get_cached_username/groupname
2007-01-19 21:24:17 +00:00
Denis Vlasenko
9af7c9d6b6
openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
...
(will close all fd's > 2 on daemonization now)
getty: fix "getty -" support, and also do not try to chown/chmod "-"
telnetd: fix "lost ctty" bug
Yet another attempt on saner function names:
bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2007-01-19 21:19:35 +00:00
Denis Vlasenko
ef44d9d9f2
sed,get_line_from_file: improve comments
2007-01-17 23:16:16 +00:00
Denis Vlasenko
d97c9244b1
Rename bb_sanitize_stdio -> bb_sanitize_server_stdio
...
(name is still bad - it doesn't hint that function
may do daemonization trick for you if asked to).
Small fixes to fakeidentd.
2007-01-14 13:12:06 +00:00
Denis Vlasenko
7a431b3715
By popular request reinstate fakeidentd's standalone mode.
...
Since this is also needed for other applets like telnetd,
introduce generic driver for such things.
It even supports inetd-wait ('linger') mode, when inetd
hands out listen socket to child and waits to it to die,
instead of handing out accepted socket and continuing
listening itself (nowait mode).
Code growth ~200 bytes.
NB: our inetd doesn't support wait mode yet (or mabe it is buggy).
2007-01-14 01:29:06 +00:00
Denis Vlasenko
2418288cac
small fixes to ipv6 infrastructure
2007-01-13 21:05:38 +00:00
Denis Vlasenko
3a34d0c08a
random small size optimizations
2007-01-12 22:10:34 +00:00
Denis Vlasenko
5d68724d5b
next part of ipv6-ization. mostly netcat.
2007-01-12 20:59:31 +00:00
Denis Vlasenko
6536a9b583
next part of ipv6-ization is here: wget & httpd
2007-01-12 10:35:23 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
8e9ccba371
ipv6-ization efforts continue. Few bugs are found,
...
unknown number likely introduced...
2007-01-11 16:50:23 +00:00
Denis Vlasenko
bbe514683a
a bit more IPv6-ization work
...
syslogd: converted to use it (in -R host:port)
2007-01-10 20:19:56 +00:00
Denis Vlasenko
9de420c27c
Improve generic ipv4+ipv6 support in libbb.
...
Convert telnet to it. Now this works:
telnetd -b [::1]:1234 - bind to IPv6 non-standard port
telnet [::1]:1234 - connect to IPv6 non-standard port
telnet ::1 1234 - same
This does not require ANY ipv6-specific code in applets
(no struct sockaddr_in6. In fact, no sockaddr_in, too).
2007-01-10 09:28:01 +00:00
Denis Vlasenko
a9b60e93ee
new libbb func: xmalloc_realpath (+ use it where makes sense)
...
syslogd, logread: add debugging code (disabled)
syslogs: drastically smaller bss; fix "-C n" behaviour
2007-01-04 17:59:59 +00:00
Denis Vlasenko
9b1381fd2f
convert calloc to xzalloc
...
fix sleep-on-die option
2007-01-03 02:56:00 +00:00
Denis Vlasenko
4a64c33443
about.html: update maintainer name
...
libbb/Kbuild: less needs xregcomp.o
2006-12-30 22:03:02 +00:00
Denis Vlasenko
6a5dc5d75a
next bunch of fixes for bugs found by randconfig
2006-12-30 18:42:29 +00:00
Denis Vlasenko
9a44c4f91c
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
2006-12-28 05:44:47 +00:00
Denis Vlasenko
666da5e2c6
merge post-1.3.0 fixes
2006-12-26 18:17:42 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
5dd7ef0f37
chattr: bugfixes and size reduction
2006-12-26 03:36:28 +00:00
Denis Vlasenko
0de9375ee6
leftover of e2fsck surgery
2006-12-26 02:51:29 +00:00
Denis Vlasenko
7cea262273
small stupid changes. no code changes
2006-12-24 07:30:09 +00:00
Denis Vlasenko
a5b3e76c38
missing piece of prev commit: ndelay_off
2006-12-24 07:15:50 +00:00
Denis Vlasenko
1dc1b37b33
use xbind, xconnect where appropriate.
...
small edits to arping
2006-12-23 02:48:44 +00:00
Denis Vlasenko
2a813e20e2
fix recognitions of -SIGname signals
...
(fix by Jacques LUDER <jacques.luder@thalesgroup.com>)
2006-12-23 01:06:21 +00:00
Denis Vlasenko
8f6c79240d
find: fix spurious -exec error messages
...
(bug reported by Bernhard Fischer <rep.nop@aon.at>)
2006-12-23 00:49:10 +00:00
Denis Vlasenko
714701c890
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)
2006-12-22 00:21:07 +00:00
Denis Vlasenko
e865e81d34
less: stop dying on bad regexps, quietly pipe data w/o
...
user interaction if stdout is not a tty.
size optimizations
2006-12-21 13:24:58 +00:00
Denis Vlasenko
bf66fbc8e2
introduce LONE_CHAR (optimized strcmp with one-char string)
2006-12-21 13:23:14 +00:00
Denis Vlasenko
3f3190e34c
less: total cleanup and bugfix.
...
Doesn't die horribly on binary files anymore.
In fact, they _100%_ work now. Control chars
are in reverse video, including DEL and that idiocy of VT-10x,
Meta-ESC [inventor of which should be prohibited from reproducing].
Regex search is fixed also. When you specify search ('/' key),
control chars turn into dots (unhighlighted),
and found occurrences highlighted instead. This is reversible.
Memory management fixed (was leaky as hell) and optimized.
Linewrapping fixed and thoroughly tested.
Max buffer size made configurable.
~ 600 bytes saved.
2006-12-21 00:22:03 +00:00
Denis Vlasenko
9a7cef930f
less: somewhat buggy applet, but nice. Muchly reduced
...
xstrdup'ing and memory consumption. Made linewrap saner.
regex matching code was awful - still buggy, but not as
leaky as before. Made buffer size configurable. Killed
several static and on-stack buffers. Hopefully eliminated
staircase effect on Ctrl-C (unable to reproduce).
2006-12-20 02:46:48 +00:00
Denis Vlasenko
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
Denis Vlasenko
15b213ef5a
su: make /etc/shells check configurable
...
ash: missing ';'
2006-12-19 00:20:20 +00:00
Denis Vlasenko
7cfecc4b36
xfuncs.c: dietlibc actually HAS fdprintf!
...
platform.h: define strchrnul for dietlibc
ash: stop using few non-standard functions
2006-12-18 22:32:45 +00:00
Denis Vlasenko
c8e6e35ba4
nc: add missing cast
...
xfuncs: add dprintf for dietlibc
2006-12-18 22:10:24 +00:00
Denis Vlasenko
83e5d6f772
A bunch of defined(__GLIBC__) added. static-linking warning expanded
2006-12-18 21:49:06 +00:00
Denis Vlasenko
b131b271a0
start_stop_daemon: fix bug where any program name was "matching"
...
processes for which readlink(/proc/N/exe) fails
2006-12-17 17:30:01 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
a597aaddfa
s/extern inline/static ATTRIBUTE_ALWAYS_INLINE/g
...
xstrtou: disallow leading '+'
2006-12-16 23:48:13 +00:00
Denis Vlasenko
6a1d661036
diff: fix -q exit code
...
last_char_is: sacrifice 9 bytes but avoid double-scan
2006-12-16 22:18:44 +00:00
Denis Vlasenko
5e2db5e8ee
build system: small fix for "release" target to work
2006-12-12 23:46:31 +00:00
Denis Vlasenko
2ea630f9a5
bb_makedev: fix for glibc 2.3.2
...
sed: fix C++ style declaration
2006-12-10 02:52:19 +00:00
Bernhard Reutner-Fischer
bbda98f14c
- cosmetic change to avoid warnings about eventual padding/packing.
2006-12-04 15:58:27 +00:00
Denis Vlasenko
8b22b07bc5
sed: improve handling of NULs
2006-12-02 17:58:10 +00:00
Denis Vlasenko
becd8c538c
passwd: made smaller by ~130 bytes. size can go negative
...
if current trend will continue ;)
2006-12-01 21:34:20 +00:00
Denis Vlasenko
002526481e
passwd: small size optimization. salt generation improved
...
(really generated different salts even if called back-to-back).
2006-11-30 20:41:28 +00:00
Denis Vlasenko
ab24e18c7a
passwd: rework:
...
* do not make backup copy by copying (just retain old file)
* correctly fall back to /etc/passwd if user is not in shadow
* fix bug with overlong passwd entries
* be permissive on some kinds of failures
* reduce stack usage
* code size: -500 bytes
2006-11-30 16:41:15 +00:00
Denis Vlasenko
c6ce8733dd
cut 0.5k off mkfs.minix
...
assorted strtoul fixes (that's what brought me into minix)...
2006-11-29 18:15:52 +00:00
Denis Vlasenko
df38188367
fix bug in new str -> num convertors
2006-11-28 10:54:16 +00:00
Denis Vlasenko
f1a6c6b362
erase_mtab: do not limit ourself to 40 mtab entries
2006-11-27 17:29:09 +00:00
Denis Vlasenko
d9e15f2068
style cleanup: return(a) -> return a, part 2
2006-11-27 16:49:55 +00:00
Denis Vlasenko
079f8afa0a
style cleanup: return(a) -> return a, part 1
2006-11-27 16:49:31 +00:00
Denis Vlasenko
3ece72dc3f
svn add bb_strtonum.c :(
2006-11-27 15:12:16 +00:00
Denis Vlasenko
d686a045c8
safe_strtoXX interface proved to be a bit unconvenient.
...
Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
2006-11-27 14:43:21 +00:00
Denis Vlasenko
e5667c1cfe
Closing bug 730. libbb run_parts is using scandir (a GNUism),
...
and it is used only by run_parts applet, so move it there.
Also saved ~30 bytes (prolly gcc autoinlining...).
2006-11-26 20:13:39 +00:00
Denis Vlasenko
cf749bc10c
small fixes:
...
fix xstrdup to not grossly overallocate memory
use xopen instean of xopen3 in several places
etc.
2006-11-26 15:45:17 +00:00
Denis Vlasenko
2d27e4ccbb
tee: fix bug: argv[-1] is a no-no!
...
bb_full_fd_action: optimize
die_if_ferror: "<applet>: filename" isn't a good err msg, add "..I/O error"
2006-11-25 23:50:28 +00:00
Denis Vlasenko
43bddf31e9
small improvements in str -> num convertors
2006-11-25 14:49:04 +00:00
Denis Vlasenko
ed836cdc30
regularize str -> num convertors
2006-11-25 14:44:13 +00:00
Denis Vlasenko
809a6e3104
small optimization
2006-11-24 22:42:44 +00:00
Denis Vlasenko
3feb2fc535
tar: fix multiple -t and/or -v options handling.
...
do not process list of files to tar up in reverse order.
2006-11-24 21:55:55 +00:00
Denis Vlasenko
d031ffa623
tar: sanitize option handling
2006-11-24 21:54:44 +00:00
Denis Vlasenko
d6772501db
tar: fix and sanitize handling of long filenames/linknames
...
(GNU extensions 'K' and 'L').
We correctly handle them when untarring now, but unfortunately
we still don't use them when tarring! That stupid 100 char limit
is still there!
The biggest problem is that we don't support 'pax' tar format.
Linux kernel tarballs are in this format... shame
2006-11-24 17:21:44 +00:00
Denis Vlasenko
d398ecab9d
hunt down improper include <>, make mkswap output 4Gb+ friendly
2006-11-24 15:38:03 +00:00
Denis Vlasenko
8023d7df78
svn add makedev.c. Forgot as usual... :(
2006-11-24 15:06:28 +00:00
Denis Vlasenko
b8a8e601df
tar: small fixes:
...
* size-optimize mapping code
* kill double close
2006-11-24 14:59:45 +00:00
Denis Vlasenko
c50f370f98
tar: cache [ug]id->username/groupname mappings. Cuts down amount
...
of open/read/close of /etc/passwd and /etc/group
dramatically (we were rereading those for each untarred file!!!)
2006-11-24 14:57:31 +00:00
Denis Vlasenko
4fbb584a0e
tar: cry murder and bail out if file shrinks under us while we tar it up
2006-11-24 14:55:23 +00:00
Denis Vlasenko
0b35470d9b
glibc makedev() is a large inline. Save 700+ bytes by wrapping it
...
into a function.
2006-11-24 14:54:27 +00:00
Denis Vlasenko
376ce1e775
tar:
...
* unpack: handle tar header fields which are not NUL terminated
* pack: handle 4+GB files correctly
* pack: refuse to store 101+ softlinks (was truncating link
target name)
* pack: mask mode with 07777
2006-11-24 14:51:01 +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
81e264d4af
fix double merge
2006-11-22 17:42:06 +00:00
Denis Vlasenko
c8717cd857
telnetd: move generic stuff into libbb. It will make it easy
...
to make other server applets IPv6-aware too.
2006-11-22 16:10:39 +00:00
Denis Vlasenko
75f8d080a2
telnetd: we were having telnetd with is ONLY inetd or ONLY standalone.
...
What if I need to have both?? This patch introduces
CONFIG_FEATURE_TELNETD_STANDALONE: y - both, n - only inetd.
2006-11-22 15:54:52 +00:00
Denis Vlasenko
5e618ff439
xgethostbyname: more readable
2006-11-21 20:35:22 +00:00
Denis Vlasenko
7ca3921e5e
bb_INET_default[] is really just a const "default",
...
nothing INET-specific
2006-11-21 20:34:21 +00:00
Denis Vlasenko
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
83ea643d8d
svlogd: new applet. +9k. Still too big, but it was 12k yesterday.
2006-11-16 02:27:24 +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
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
aae0311356
smart_ulltoa5: make available in libbb
2006-11-05 00:44:39 +00:00
Denis Vlasenko
459e4d6cf7
replace /proc scanning code by more versatile one.
...
Use it where appropriate.
Stop scanning /etc/passwd *for every process*!!! (uid->username)
top: reduce memory usage - we won't save unneeded fields
from /proc info anymore. Downside: ~+250 bytes of code
2006-11-05 00:43:51 +00:00
Denis Vlasenko
fa07680091
top: improve CPU% calculation
...
style fixes
2006-11-05 00:38:51 +00:00
Denis Vlasenko
dd539f7687
Unneeded code removed, usused field "unsigned pscpu" removed
2006-11-01 20:20:37 +00:00
Denis Vlasenko
35fb512728
PID should be stored in pid_t, not int or long.
...
find_pid_by_name() was returning 0 or -1 in last array element,
but -1 was never checked. We can use just 0 intead.
2006-11-01 09:16:49 +00:00
Denis Vlasenko
966ec7c067
#if CONFIG_xxx -> #if ENABLE_xxx
2006-11-01 09:13:26 +00:00
Denis Vlasenko
b141b9b512
reads: fix bug 1078
2006-10-31 22:46:08 +00:00
Denis Vlasenko
6ae8079e2d
login: re-enable Ctrl-^C before execing shell.
2006-10-31 17:34:44 +00:00
Denis Vlasenko
3b8ff68ec8
dd: fix bugs: always assumed conv=sync, died on write errors
...
w/o perror and statictics. Several small improvements
2006-10-31 15:55:56 +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
8c35d65c43
recursive_action: add depth param
...
chmod: match coreutils versus following links
2006-10-27 23:42:25 +00:00
Denis Vlasenko
3b8fc1c582
recursive_action: preparatory changes. will introduce "int level".
2006-10-27 17:59:14 +00:00
Denis Vlasenko
cf70433173
modprobe: reformat to match bbox style
2006-10-27 15:12:50 +00:00
Denis Vlasenko
dca0b707c0
reshuffle libbb.h contents so that order of decls makes sense
...
Found bad typo in largefile support :)
2006-10-27 09:05:02 +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
1340ca8c87
As usual, I forgot "svn del"...
2006-10-27 07:17:36 +00:00
Denis Vlasenko
2fe7b73d99
...and yet another small fix. Ouch...
2006-10-26 23:39:04 +00:00
Denis Vlasenko
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
f0ed376eda
remove bb_printf and the like
2006-10-26 23:21:47 +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
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
f24e1f40e0
cp: add support for -s, -l. Fix free(nonmalloc) bug.
...
Add doc on POSIX's rules on -i and -f (insane!).
ln: make "ln dangling_symlink new_link" work.
2006-10-21 23:40:20 +00:00
Denis Vlasenko
456fa6c0b1
readlink: do not emit errors if file doesnt not exist / not a link
...
getopt32: add =N support
2006-10-20 18:36:55 +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
d0e70af9d1
nc: fix 2 my own buglets, and few someone else's too.
2006-10-16 01:10:28 +00:00
Denis Vlasenko
3a6755f56f
grep: add support for -r
2006-10-14 14:24:30 +00:00
Denis Vlasenko
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +00:00
Denis Vlasenko
88ca067690
xread/write can use full_read/write (smaller code)
2006-10-12 22:44:13 +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
372686bde7
cut, mount: small improvements
2006-10-12 22:42:33 +00:00
Denis Vlasenko
a6dbb08a48
small style fixes
2006-10-12 19:29:44 +00:00
Denis Vlasenko
12f5676cce
execable: no need to check getenv for NULL, it works anyway.
2006-10-12 06:15:13 +00:00
Denis Vlasenko
5cb46485dd
execable.c: forgot to do "svn add" again...
2006-10-12 06:12:11 +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
1db39b2f51
nmeter: new applet. ~4k
...
Fix build proble on x86_64
2006-10-11 20:59:02 +00:00
Denis Vlasenko
1114de7219
od: provide full-blown od from coreutils if CONFIG_DESKTOP
2006-10-10 23:26:05 +00:00
Denis Vlasenko
cba9ef5523
fixes from Vladimir Dronnikov <dronnikov@gmail.ru>
2006-10-10 21:00:47 +00:00
Denis Vlasenko
ca3c981c07
start_stop_daemon: add -N <nice> compat
...
[re]nice: add support for -nNNN w/o spaces, -NNN (nice only),
simplified code
2006-10-08 23:36:17 +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
c12f53090b
dnsd fix; option_mask32 added. dnsd needs more love.
2006-10-06 09:49:47 +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
b6332248ca
fdformat: remove redundant check
2006-10-03 19:57:50 +00:00
Denis Vlasenko
cf94446af7
random style fixes
2006-10-03 19:02:20 +00:00
Denis Vlasenko
fe54458e46
runit/chpst: "change process state" utility
...
It's "nice" on steroids - can set uid/gid, mem/cpu limits etc. +3.5k
2006-10-03 15:57:40 +00:00
Denis Vlasenko
b97c9842a5
sed: unbreak multiple -e, -f option handling (my fault)
2006-10-01 21:05:12 +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
a959588b80
Yet another silly little byte saving. couldn't -> cannot
2006-09-29 21:30:43 +00:00
Denis Vlasenko
266bc17690
top: add support for -b, -n <iterations>
2006-09-29 17:16:39 +00:00
Denis Vlasenko
f0d6cc8ca9
getopt_ulflags: fix indentation in comment (needs to be 8 _spaces_
...
in order to look correct to both 4 tab and 8 tab population).
Add comment about :: (which indicates optional argument).
2006-09-29 13:56:58 +00:00
Denis Vlasenko
b02ef82c99
getopt_ulflags: formatting fixes
2006-09-29 08:23:42 +00:00
Denis Vlasenko
6248a734e2
xargs: simplify option parsing
2006-09-29 08:20:30 +00:00
Denis Vlasenko
524176680d
Tried to find sha1_crypt - nope... ok, save few bytes in md5_sha1_sum.c
...
(time to sleep, 02:28 in the morning)...
2006-09-28 00:29:00 +00:00
Denis Vlasenko
de9ec92958
usage.h: fix compile-time bugs exposed by previous change
2006-09-27 23:31:59 +00:00
Denis Vlasenko
a77947f5bb
kill: fix bugs (kill -l output was horrible), fix style, constify data
2006-09-27 14:19:16 +00:00
Denis Vlasenko
be905d550c
process utilities related style cleanup
2006-09-27 14:17:31 +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
c290563319
remove unneeded #includes, fix indentation
2006-09-23 16:01:09 +00:00
Denis Vlasenko
a36a676923
correct_password: undo whitespace damage.
...
vlock + correct_password: fix incorrect line breaks in messages.
2006-09-23 13:11:49 +00:00
Denis Vlasenko
6429aabbf1
bb_askpass: shorten static password buffer. 256 is way too large.
...
simplify code a bit.
2006-09-23 12:22:11 +00:00
Denis Vlasenko
27ee7ba95e
losetup: getopt_ulflags'ification + small fix for perror_nomsg
2006-09-22 14:53:41 +00:00
Rob Landley
fbdf121b7d
Teach get_terminal_width_height to fall back to $LINES and $COLUMNS when
...
used via things like a serial console.
2006-09-20 22:06:01 +00:00
Denis Vlasenko
0b5fd45ef7
change char *string = "foo" -> char string[] = "foo"
...
function old new delta
xsetenv 45 44 -1
iproute_list_or_flush 1834 1833 -1
ipaddr_modify 1915 1914 -1
ipaddr_list_or_flush 1861 1860 -1
invarg 39 38 -1
do_set 1259 1258 -1
bb_verror_msg 268 267 -1
create_icmp_socket 142 140 -2
create_icmp6_socket 142 140 -2
bb_full_fd_action 324 322 -2
bb_path_mtab_file 10 - -10
.rodata 214796 214720 -76
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/11 up/down: 0/-99) Total: -99 bytes
2006-09-19 09:55:09 +00:00
Denis Vlasenko
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Denis Vlasenko
6231e870ec
style fixes
2006-09-17 15:45:48 +00:00
Rob Landley
da9d1d079e
Strangely, using // in the comments I added was not a persistent accident.
2006-09-14 19:52:07 +00:00
Bernhard Reutner-Fischer
7fee0c4357
- fix copy'n paste errors that got introduced when switching to the shorter boilerplate.
...
No object code changes.
2006-09-13 16:39:19 +00:00
Rob Landley
20cc6d567f
Remove pointless "const". Bloatcheck says 0 bytes difference.
2006-09-12 21:42:17 +00:00
Bernhard Reutner-Fischer
b5f50ea344
- small trivia to be gentle to gcc-2.95.x which had no va_copy but only __va_copy.
2006-09-12 13:27:55 +00:00
Bernhard Reutner-Fischer
428a5cd0d3
- fix warning about discarding qualifiers in initialization
2006-09-12 13:25:16 +00:00
Bernhard Reutner-Fischer
57b56674a3
- merge xstat.c into xfuncs.c
2006-09-11 09:18:09 +00:00
Denis Vlasenko
0c45bb23d2
tar: fix "xopen with O_CREAT" warning, improve zero padding write
...
(was doing zillions of 1-byte write syscalls)
2006-09-09 12:49:03 +00:00
Denis Vlasenko
bd8f43dbab
few random readability enhansements. No code changes
2006-09-08 17:31:55 +00:00
Denis Vlasenko
2e502914b0
login: style fixes
2006-09-08 17:22:45 +00:00
Denis Vlasenko
a9801658ee
getty, sulogin: convert to using bb_msg for syslog output
2006-09-07 16:20:03 +00:00
Denis Vlasenko
b750dec40a
fix if (ENABLE_FEATURE_SYSLOG & (...)) - should be &&
2006-09-07 16:03:45 +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
3da6aa878a
adding files missed in prev updates (forgot about svn add)
2006-09-07 05:09:22 +00:00
Denis Vlasenko
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +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
e614eaf40d
- mdev and grep use xregcomp. Closes bug #1021
2006-09-06 13:24:39 +00:00
Denis Vlasenko
797b4d210d
run_shell.c: style fix
2006-09-05 09:45:30 +00:00
Denis Vlasenko
d25a2645f5
xfunc: fix: && -> &. Also nuked two double semicolons...
2006-09-05 09:36:19 +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
65dbd8752b
zcip: getopt -> bb_getopt_ulflags
2006-09-03 12:27:25 +00:00
Denis Vlasenko
27af5a0dd3
replacing func() with xfunc() where appropriate
2006-09-03 12:21:59 +00:00
Bernhard Reutner-Fischer
73561cc75a
- pull from busybox_scratch: r15829:15850
...
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
text data bss dec hex filename
1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old
1086790 15853 790632 1893275 1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped
function old new delta
ipcrm_main 756 822 +66
getval - 61 +61
maybe_set_utc - 40 +40
udhcpc_main 2896 2912 +16
md5_hash_block 428 437 +9
opt 8 16 +8
qgravechar 106 110 +4
make_bitmap 292 295 +3
inflate_unzip 2056 2059 +3
add_partition 1412 1414 +2
__parsespent 156 158 +2
qrealloc 41 42 +1
format - 1 +1
catv_main 313 314 +1
watch_main 293 292 -1
varunset 81 80 -1
part 1 - -1
check_if_skip 837 836 -1
start_stop_daemon_main 840 837 -3
create_lost_and_found 175 172 -3
supress_non_delimited_lines 4 - -4
static.l 4 - -4
static.c 5 1 -4
bsd_sum_file 237 233 -4
eval2 338 332 -6
arithmetic_common 166 158 -8
cmpfunc 22 5 -17
cksum_main 294 275 -19
cmp_main 465 439 -26
dd_main 1535 1508 -27
rmmod_main 376 333 -43
cut_file 727 644 -83
ipcs_main 3809 3721 -88
cut_main 722 614 -108
date_main 1443 1263 -180
remove_ids 222 - -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
2006-08-28 23:31:54 +00:00
Rob Landley
b8cea6dcb3
Jordan Crouse submitted a patch to only include xregcomp.c when we actually
...
use it, thus fixing building against uClibc with regex support disabled.
2006-08-28 20:04:46 +00:00
Rob Landley
abfe107f78
No real need for my_query_module() and this eliminates some type-punned
...
pointer warning on certain gcc versions (and saves 38 bytes).
2006-08-28 19:40:08 +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
Rob Landley
519d7df930
Another whack at scripts/individual. Now builds 212 applets.
2006-08-09 20:56:23 +00:00
Rob Landley
e3781b7312
Add shared subtree support, suggested by Vladimir Dronnikov. Also break out a
...
few new (unfinished) config options, which I intend to make hidden (but
enabled) when CONFIG_NITPICK is disabled. Getting the .config infrastructure
to do that is non-obvious, it seems...
2006-08-08 01:39:49 +00:00
Rob Landley
23b61be0df
Add comments to all the functions in this file documenting what they're for.
2006-08-04 20:20:03 +00:00
Rob Landley
2c55fcac08
Thinko spotted by Vladimir Dronnikov.
2006-08-04 05:24:58 +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
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
df822f2606
We need xsetuid() and xsetgid() because per-user process resource limits can
...
prevent a process from switching to a user that has too many processes, and
when that happens WE'RE STILL ROOT. See http://lwn.net/Articles/190331/
2006-07-15 23:00:46 +00:00
Mike Frysinger
83169c607b
Tito writes: If the gecos field of an user is empty, obscure reports a false "similar to gecos" error.
2006-07-15 03:59:00 +00:00
Rob Landley
1f9145c5c3
More minor tweaks.
2006-07-12 21:31:16 +00:00
Mike Frysinger
58dda84ecc
decuddle () from for/if/while
2006-07-12 20:04:00 +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
ab7d9be17c
Patch from Tito to remove pwd_to_spwd (which we don't actually need), with
...
some #ifdef removal from me.
2006-07-11 16:19:17 +00:00
Rob Landley
22d3958d76
Denis Vlasenko spotted the lack of bounds checking in my first attempt at
...
itoa/utoa.
2006-07-11 00:44:36 +00:00
"Robert P. J. Day"
5d8843e451
Replace current verbose GPL stuff in libbb/*.c with one-line GPL boilerplate.
2006-07-10 11:41:19 +00:00
Rob Landley
5b88a38157
Add itoa and utoa to see what Denis Vlasenko thinks.
2006-07-10 07:41:34 +00:00
Rob Landley
9ebd1bd468
Attempt to address Shaun Jackman's problem adding "busybox: busybox.bflt" to
...
.config.mak.
2006-07-06 20:02:47 +00:00
"Robert P. J. Day"
c9f423a93d
Correct the comment to match the code.
2006-07-02 19:52:52 +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"
087b9d640e
Allow a user-configurable minimum password length.
2006-07-02 18:35:39 +00:00
"Robert P. J. Day"
edd9ca5743
More removal of "#if 0" content.
2006-07-01 14:52:12 +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
8bbdb8732f
This kind of paranoia is a debug option at best.
2006-06-30 16:36:56 +00:00
Rob Landley
a6e6037219
Fix bug http://bugs.busybox.net/view.php?id=874 where hexdump -C got its
...
spacing wrong.
2006-06-28 14:36:50 +00:00
Rob Landley
22f383e695
Fix http://bugs.busybox.net/view.php?id=906 which could cause failures in top.
2006-06-27 18:14:12 +00:00
Rob Landley
a892bf8284
Whitespace. (Vim's auto-indent is kind of annoying at times, like "daytime"
...
and "nighttime"...)
2006-06-25 15:37:28 +00:00
Rob Landley
934da82913
Fix a possible race condition if two processes try to claim the same loop
...
device at the same time. We should only CLR_FD if the set status fails,
not if the SET_FD fails.
2006-06-25 15:29:12 +00:00
Rob Landley
c983274565
The logic to make cp -d or -P treat things like regular files should only
...
trigger for symlinks, not for device nodes. This should fix "cp -a /dev ."
to work as expected (when run by root, anyway).
While I was there, cleanup headers and make an #ifdef go away...
2006-06-24 21:27:36 +00:00
Rob Landley
8437ede6c2
The type changed too.
2006-06-20 16:43:05 +00:00
Peter Kjellerstedt
5ab8f7de4f
Use the new names for tty_baud_to_value() and tty_value_to_baud() again.
2006-06-20 16:35:37 +00:00
Rob Landley
57c1f73dd5
Revert the last two patches to go back to a state before this file was
...
controversial.
2006-06-20 16:17:24 +00:00
Rob Landley
290fcb4213
Undo all of the ugliness and some of the bloat from 15412.
2006-06-18 23:59: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
Mike Frysinger
b000586d02
danf writes: stty doesn't support baud rates > 460800 bps, the attached patch adds support for all baud rates supported by Linux 2.6.16 on x86.
2006-06-17 22:41:28 +00:00
Rob Landley
d9a761d9c3
Revert svn 15333. If you vfork, you must either exec or exit. (The parent is
...
blocked until you do so.)
2006-06-16 16:35:53 +00:00
Rob Landley
c7ddefc062
Attempt at fixing bug 815 by upgrading bb_spawn() so that builtins are at
...
the start of the path. (This should be under the same config option as
the standalone shell, but right now that's buried in the shell menu.)
Also add the ability to specify CONFIG_BUSYBOX_EXEC_PATH with /proc/self/exe
as an overrideable default.
2006-06-14 01:24:33 +00:00
Rob Landley
18958e9309
Random cleanup of platform.h.
2006-06-13 18:28:33 +00:00
Bernhard Reutner-Fischer
2d1a6e7c1f
- fix bug #887 , in bb_get_chomped_line_from_file(), the last char was removed
...
unconditionally, even if it was not a newline.
This was apparently broken by r14254
- whitespace while at it.
2006-06-10 11:04:43 +00:00
Paul Fox
6ab037872f
made "test" an ash built-in.
...
moved the contents of libbb/bb_echo.c back into coreutils/echo.c,
which is a more reasonable place for them than libbb. this
forces anyone who wants echo and test to be builtin to ash to
also have them available as applets. their cost is very small,
and the number of people who wouldn't want them as applets is
also very small.
added warning about shell builtins vs. CONFIG_FEATURE_SH_STANDALONE_SHELL,
which conflicts with their use.
thanks to nathanael copa for debugging help.
some string size optimization in test.c may have been lost with
this commit, but this is a good new baseline.
2006-06-08 21:37:26 +00:00
Mike Frysinger
6fb5847faf
sometimes daemonizing and vfork()/exit() is ok
2006-06-07 21:48:30 +00:00
Mike Frysinger
ca70774293
bb_xdaemon() isnt available on no-mmu systems
2006-06-07 21:47:34 +00:00
Mike Frysinger
373af43bb0
comment all fields
2006-06-07 21:37:59 +00:00
Mike Frysinger
301ad67912
add reference to proc(5)
2006-06-07 20:24:34 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Mike Frysinger
828d6bb3bc
whitespace
2006-06-07 20:04:13 +00:00
Mike Frysinger
62a2c15376
whitespace
2006-06-07 20:03:13 +00:00
Bernhard Reutner-Fischer
f9437aaf5b
- make getopt_ulflags aware of CONFIG_GETOPT_LONG
2006-05-31 14:12:51 +00:00
Bernhard Reutner-Fischer
f3ac9ebc8e
- convert xcalloc(1,x) to xzalloc
2006-05-31 13:31:16 +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
bba7f08d27
Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts values
...
to/from little endian or big endian, which is a NOP if that's what the current
platform already is.
2006-05-29 05:51:12 +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
Rob Landley
5edc10275e
Slight sanity fix: data is void *, not char *. And it's called data
...
almost everywhere, so be consistent.
2006-05-26 23:00:10 +00:00
Bernhard Reutner-Fischer
781e42d66c
- introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).
...
- fix last.c to also look at the double-underscore UT_ defines.
2006-05-26 14:41:40 +00:00
Bernhard Reutner-Fischer
76b82cfd6f
- make find_mount_point conditional on df and eject; Fixes `make hosttools´ on
...
hosts where mntent.h does not exist.
2006-05-26 13:38:43 +00:00
Mike Frysinger
4f93a63467
errno and h_errno values are not the same #876 by rfelker
2006-05-26 01:56:42 +00:00
Rob Landley
399d2b5c24
Rich Felker suggested removing dprintf() from watch, and one thing led to
...
another... This adds bb_xspawn() support, which does vfork/exec. (I don't
know why using a static instead of a local adds ~40 bytes, but using
the local doesn't work...)
2006-05-25 23:02:40 +00:00
Rob Landley
80b8ff07ca
A pending item in my tree I might as well check in: I plan to migrate calloc()
...
and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but
only takes one argument (the size).
2006-05-19 20:36:49 +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
38583fd6f2
- use uint32_t instead of __u32
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:44:16 +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
34b5319d86
Make md5 calculation always go through an the buffer so that A) we don't
...
handle packets out of sequence if some data goes through the buffer and
some doesn't, B) it works on systems that can't handle aligned access,
C) we just have one code path to worry about.
While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine
well, which is why md5sum has been reading and processing data 4 bytes at a
time. I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop
unrolling and such in the algorithm was an attempt to work around that bug.
2006-05-16 02:38:26 +00:00
Bernhard Reutner-Fischer
2f38f27b42
- patch from Robert P. J. Day to use filter instead of findstring.
2006-05-15 10:04:50 +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
Rob Landley
f7897ec47b
Autodetect parts of a multipart file, from Robert P. Day's suggestion.
2006-05-12 01:42:33 +00:00
Rob Landley
cc848ddbf8
Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
...
to the file.
2006-05-11 18:25:24 +00:00
Rob Landley
a6b5b60942
Fiddling with llist to make memory management easier. Specifically, the
...
option to delete the contents of the list when we delete the list is a
good thing.
2006-05-08 19:03:07 +00:00
Rob Landley
0ea0aefcb5
Remove a link that leaked in from the pending llist_t changes.
2006-05-08 15:08:25 +00:00
Rob Landley
a389651115
Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
...
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
2c39eee805
Migrate endianness macros.
2006-05-05 16:54:40 +00:00
Rob Landley
552b56dfd1
Not quite compiler independent, but we've never tried to be gcc independent
...
anyway. This is at least less ugly than what was there before, and fixes
building all sources at once.
2006-05-04 21:22:27 +00:00
Rob Landley
f76cd964ec
Whitespace and documentation cleanup from Dennis Vlasenko.
2006-05-03 21:23:15 +00:00
Rob Landley
7818a422bc
Portability tweak from Shaun Jackman, don't include asm/page.h directly.
2006-04-25 18:42:23 +00:00
Rob Landley
bbd50b58ea
Remove some #if 0 code.
2006-04-18 20:42:39 +00:00
Bernhard Reutner-Fischer
54f75ee300
- BusyBox is under GPL.
...
in http://www.busybox.net/lists/busybox/2006-April/020364.html Denis Vlasenko
said when asked which license to use for these files:
"Sure. LGPL or GPL is fine with me."
Adjusting accordingly.
2006-04-18 08:24:13 +00:00
Mike Frysinger
1a54030445
use memmove() instead of bcopy()
2006-04-16 05:58:21 +00:00
Mike Frysinger
78bd504947
use memcmp() not bcmp()
2006-04-16 05:51:47 +00:00
Bernhard Reutner-Fischer
c2cb0f32b4
- patch from Denis Vlasenko to add and use bb_xopen3()
2006-04-13 12:45:04 +00:00
Bernhard Reutner-Fischer
d9cf7ac781
- patch from Denis Vlasenko to add and use bb_xchdir()
2006-04-12 18:39:58 +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
2c99851181
- patch from Denis Vlasenko to add and use bb_xdaemon()
2006-04-12 18:09:26 +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
Bernhard Reutner-Fischer
cb44816ba3
- add and use bb_opendir(), bb_xopendir().
...
text data bss dec hex filename
889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig
889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2
889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig
888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
2006-04-12 07:35:12 +00:00
Rob Landley
c57ec37959
Patch from Rob Sullivan to consolidate crc32 table generation.
2006-04-10 17:07:15 +00:00
Bernhard Reutner-Fischer
fa939aae81
- include proper headers.
2006-04-05 16:21:37 +00:00
Bernhard Reutner-Fischer
421d9e5941
- move buffer allocation schemes to libbb.h
...
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-04-03 16:39:31 +00:00
Rob Landley
a13cca9cf4
New version from Tito.
2006-04-02 18:57:20 +00:00
Bernhard Reutner-Fischer
d409c3a2f7
- Rich Felker writes: fix invalid printf format strings
...
http://busybox.net/lists/busybox/2006-March/019568.html
text data bss dec hex filename
900619 10316 1038724 1949659 1dbfdb busybox.oorig
900603 10316 1038724 1949643 1dbfcb busybox
2006-03-29 22:34:47 +00:00
Rob Landley
ca087713f2
More extern removal from Robert P. Day.
2006-03-29 16:52:56 +00:00
Bernhard Reutner-Fischer
cb8d4319a3
find ./ -name .cvsignore | xargs svn rm
2006-03-29 15:51:19 +00:00
Mike Frysinger
f885513940
just whitespace fixes
2006-03-28 02:35:56 +00:00
Rob Landley
3570915769
More dead code removal.
2006-03-26 21:49:42 +00:00
Rob Landley
1bb31928d5
Bug spotted by Stephane Billiart: losetup depends on loop.c.
2006-03-23 16:49:22 +00:00
Rob Landley
fb3a631310
Very nice patch from Rich Felker to portably set the stream error indicator and
...
thus remove a lot of nasty old code that didn't.
2006-03-23 15:30:26 +00:00
Rob Landley
8dd4ca787a
Patch from Shaun Jackman to make loop.c build only when needed.
2006-03-21 16:22:19 +00:00
Bernhard Reutner-Fischer
263e75d051
- fix order of includes.
2006-03-18 11:59:55 +00:00
Rob Landley
aae8b3405e
Whitespace cleanup and minor tweak (return -ERRNO instead of ERRNO so
...
EPERM doesn't register as a successful read-only mount.
2006-03-18 02:38:10 +00:00
Rob Landley
ea9a471acd
Random in-passing tweak.
2006-03-16 14:40:27 +00:00
Rob Landley
31642d75e1
More "extern" removals from Robert P. Day
2006-03-14 21:45:38 +00:00
Rob Landley
386f85eadf
Attempt to make a warning go away without increasing size.
2006-03-14 21:13:48 +00:00
Bernhard Reutner-Fischer
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Rob Landley
c5b1d4d6b1
Patch from Denis Vlasenko to add xstat() and use it.
2006-03-13 15:45:16 +00:00
Rob Landley
bc68cd14cc
Patch from Denis Vlasenko turning static const int (which gets emitted into
...
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
1f305dc0fd
Portability patch from rfelker. The bb_asprintf.c thing needs an eventual
...
follow up in platform.h to set the #ifdef, but the workaround works for
everybody, so...
2006-03-09 22:21:20 +00:00
Bernhard Reutner-Fischer
07a79e75f5
- backout using features which are not available with the previous stable
...
version of make (3.71.1).
2006-03-09 09:03:37 +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
Bernhard Reutner-Fischer
e3ec99de82
- remove unused lists *-m
2006-03-02 18:23:13 +00:00
Bernhard Reutner-Fischer
022eb311d5
- use absolute path for top_builddir and top_srcdir.
...
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e
- fixes parallel builds (make -j)
...
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
2b26fd5570
A few changes falling out from the effort to make sed handle embedded NUL bytes.
...
Checking in to reduce the diff between my tree and svn...
2006-02-24 02:30:39 +00:00
Mike Frysinger
992a58c216
document leading + option
2006-02-22 22:56:30 +00:00
Rob Landley
87b9573ff8
Forgot to check this in last night, part of the hash_fd breakup.
2006-02-21 15:04:07 +00:00
Rob Landley
5cf7c2df66
Patch from Devin Bayer to split up hash_fd.c into md5.c and sha1.c. (I tweaked
...
md5_sha1_sum.c to convert some #ifdef CONFIG to if(ENABLE).)
2006-02-21 06:44:43 +00:00
Mike Frysinger
57f4cb2867
a few more comment touchups
2006-02-21 00:50:37 +00:00
Mike Frysinger
e17c80e604
translate Russian-English to just plain English
2006-02-21 00:37:42 +00:00
"Vladimir N. Oleynik"
7673ccad60
sync with mainstream, but check more
2006-02-20 16:57:36 +00:00
Rob Landley
081d6d4380
getdomainname() isn't guaranteed to null terminate the string if it was
...
truncated for length. SVN 14135 made sure that the truncated version would
always be null terminated. SVN 14144 broke this for no readily apparent
reason, and I have no idea what it was even trying to accomplish. Reverted.
2006-02-20 16:31:44 +00:00
"Vladimir N. Oleynik"
0c6ff43a0c
remove #undef strlen, use #define strlen always but without xfunc/BB_STRLEN_IMPLEMENTATION
2006-02-20 12:15:10 +00:00
"Vladimir N. Oleynik"
d24d083061
correction get(host/domain)name usage, revert 742 bug
2006-02-20 10:44:02 +00:00
Rob Landley
4e9deec8bf
svn 14077 was completely broken and apparently never tested.
2006-02-20 02:44:30 +00:00
Mike Frysinger
dce17c6268
rfelker writes in Bug 742: make sure string is null terminated after calling gethostname
2006-02-19 23:03:31 +00:00
Mike Frysinger
294254ce6b
rfelker writes in Bug 740: s/u_char/unsigned char/
2006-02-19 22:59:12 +00:00
"Vladimir N. Oleynik"
06776b3650
type typo. Thanks, Devin Bayer
2006-02-17 09:33:22 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b
moved BB_BANNER to applets/version.c file: make kernel like version,
...
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
"Vladimir N. Oleynik"
21e68703ce
removed #undef strlen, use builtins and prototuped strlen from xfunc file (only\!)
2006-02-16 14:38:41 +00:00
"Vladimir N. Oleynik"
465300ced9
cleanups after changes by Denis Vlasenko. Size optimization
2006-02-14 10:17:09 +00:00
Rob Landley
b2804551a0
Cleanups from Denis Vlasenko.
2006-02-13 22:04:27 +00:00
Rob Landley
90632d021c
Bug fix from Kim B. Heino, manifested via:
...
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip
2006-02-13 19:40:43 +00:00
Rob Landley
bec26527a1
Save a few bytes in error message.
2006-02-05 03:31:44 +00:00
"Vladimir N. Oleynik"
4fc92206ed
destroy bug 679, use getopt_ulflags with new feature: usage option. Removed two strdup
2006-02-02 14:48:54 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
Bernhard Reutner-Fischer
3038557649
- bzero -> memset
...
text data bss dec hex filename
1652855
14444 1215616 2882915 2bfd63 busybox.oorig.gcc-3.3
1652823 14444 1215616 2882883 2bfd43 busybox.gcc-3.3
1603655 14412 1215552 2833619 2b3cd3 busybox.oorig.gcc-3.4
1603655 14412 1215552 2833619 2b3cd3 busybox.gcc-3.4
1609755 14508 1215744 2840007 2b55c7 busybox.oorig.gcc-4.0
1609755 14508 1215744 2840007 2b55c7 busybox.gcc-4.0
1590495 13516 1215392 2819403 2b054b busybox.oorig.gcc-4.1-HEAD
1590495 13516 1215392 2819403 2b054b busybox.gcc-4.1-HEAD
1589079 13036 1213248 2815363 2af583 busybox.oorig.gcc-4.2-HEAD
1589079 13036 1213248 2815363 2af583 busybox.gcc-4.2-HEAD
2006-01-31 17:57:48 +00:00
"Vladimir N. Oleynik"
1f17d3287a
more obscure
2006-01-31 12:36:51 +00:00
"Vladimir N. Oleynik"
7600eec732
avoid signed<->unsigned warning
2006-01-31 12:12:15 +00:00
Bernhard Reutner-Fischer
cd98555dfa
- fix typo i introduced yesterday.
2006-01-31 08:17:13 +00:00
Eric Andersen
76b24270d4
with 2.4 kernel headers, lo_file_name is char, but with 2.6
...
headers we get a u8 for lo_file_name, so always cast to (char *)
when treating it as such.
2006-01-30 17:30:22 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +00:00
Bernhard Reutner-Fischer
0e8727d93b
- make linking against libcrypt optional by looking if pw_encrypt() or
...
correct_password() is configured. Fixes allnoconfig pulling in -lcrypt.
2006-01-30 15:29:55 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Rob Landley
b70ccd9509
Close bug 644: loop incrementing twice, skipping ever other device.
2006-01-22 23:17:18 +00:00
Bernhard Reutner-Fischer
37dec0e9e9
- make CONFIG_MD5SUM_SIZE_VS_SPEED configurable via menuconfig.
...
- use shorter boilerplate.
2006-01-17 12:07:03 +00:00
Bernhard Reutner-Fischer
7ca61b6f33
- shared libbusybox.
...
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
Bernhard Reutner-Fischer
853c44b798
- correct definitions.
2006-01-13 12:03:26 +00:00
Bernhard Reutner-Fischer
dd9dce104d
- shrink simple obscure stuff a tiny bit:
...
text data bss dec hex filename
789 0 0 789 315 obscure.o.oorig
771 0 0 771 303 obscure.o
- replace bzero by memset while at it.
2006-01-12 15:38:12 +00:00
"Vladimir N. Oleynik"
f01e1784e5
removed a warning about an unused pargv in bb_getopt_ulflags. Noticed by Tito
2006-01-09 13:28:31 +00:00
Rob Landley
3d1bbf0a5f
Minor cosmetic fix from Tito.
2006-01-09 01:07:24 +00:00
Rob Landley
84cb76733f
patch from tito: consolidate delay functions as bb_do_delay()
2006-01-06 20:59:09 +00:00
Rob Landley
9085467970
Trying to losetup a device as a regular user shouldn't result in an endless
...
loop, and the error messages should display correctly now.
2005-12-21 16:53:57 +00:00
Rob Landley
e422af6bcb
Flush input when prompting for a password (bug 373).
2005-12-12 07:02:15 +00:00
"Vladimir N. Oleynik"
bf968f71f1
reduce signedness warning
2005-12-02 10:10:28 +00:00
Rob Landley
1d589b2e2d
Fix losetup so that it A) actually works again, B) has much better error
...
messages, C) can show the current association (if any) when called
with only one argument. Update the documentation a lot too.
Remind me to add a test suite for this thing. I think I've figured out
how to handle root-only testsuites...
2005-11-29 23:47:10 +00:00
"Vladimir N. Oleynik"
cc34344d91
change the interface of libbb/compare_string_array (unsigned short to int), usaging for e2fsprogs/fsck
2005-11-26 10:45:26 +00:00
"Vladimir N. Oleynik"
61ff4b3973
more use const for interface of libbb/compare_string_array, example usage for e2fsprogs/fsck
2005-11-26 10:33:55 +00:00
"Vladimir N. Oleynik"
4eb2fd6826
more use libbb/bb_msg_read_error
2005-11-25 11:36:36 +00:00
Rob Landley
b4c823211d
Move interface.c to networking directory since it's only used by ifconfig.
2005-11-22 07:52:54 +00:00
Rob Landley
9033453c18
My last change to this file broke tar x. Sigh. (Trying to make sure we work
...
on file sizes between 2 and 4 gigs on 32 bit machines. For supporting >4 gigs,
just use a 64 bit machine already...)
2005-11-12 11:04:11 +00:00
Rob Landley
3fc4ad1478
Fix bug 424: doing full_read breaks things like cat which should return a
...
chunk of data when they get it and not block until they've buffered 4k.
The use case was cat /proc/psaux, but you can also reproduce this by
running non-busybox cat by itself and typing things at the command line.
Then run busybox cat. Notice how cat is _supposed_ to echo each line back
to us as we hit enter?
2005-11-04 01:54:15 +00:00
Rob Landley
21ccbb6c0e
When cp ran out of space it didn't return a nonzero error code. Fixes bug 493.
2005-11-04 01:20:46 +00:00
Rob Landley
2f30932eca
Fix cp /dev/null filename, and a few in-passing cleanups.
2005-11-01 21:55:14 +00:00
Rob Landley
2454ebd85d
Somebody suggested this, but I've forgotten who.
2005-10-27 22:50:04 +00:00
Rob Landley
3c6bfe3e33
Shaun Jackman noted that limits.h defines path_max and isn't included from
...
find_root_device.c. (We #include it in busybox.h but not libbb.h, it seems.
Someday, someone's going to have to clarify for me the difference between
those two...)
2005-10-25 02:22:13 +00:00
"Vladimir N. Oleynik"
0fa9deda17
more const
2005-10-20 09:48:28 +00:00
Bernhard Reutner-Fischer
7547a6e2f6
- don't update copyright years. He might release it, but apparently will have
...
to update the year himself.
2005-10-15 20:56:31 +00:00
Bernhard Reutner-Fischer
94c3331d47
- an empty middle term in ?: violates ISO C
...
- use shorter boilerplate and use C89 style comments
2005-10-15 14:13:09 +00:00
"Vladimir N. Oleynik"
6f347ef9dc
common BUFSIZ BSS buffer, small reduce code, data and bss
2005-10-15 10:23:55 +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"
86a1073e0b
bb_dev_null
2005-10-12 15:21:32 +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
Rob Landley
ff567f7943
The check for EROFS was wrong. For example, if you try to mount a filesystem
...
appended to an executable that's being run (yes, I'm doing this) you get
EPERM, but mounting readonly fixes it. Doing the fallback all the time
shouldn't hurt, and is one less test.
2005-10-11 07:26:15 +00:00
"Vladimir N. Oleynik"
083d3f49c2
bb_mkdep: Rewroted. removed problem "include name must uniq", speed up * 3.
...
e2fsprogs: remove confuse bb_mkdep. Use internal e2fsprogs includes only.
other: remove confuse bb_mkdep.
2005-10-10 11:35:17 +00:00