Commit Graph

1069 Commits

Author SHA1 Message Date
Denis Vlasenko
3983bd5593 diff: fix SEGV (NULL deref) in diff -N 2007-03-26 22:58:21 +00:00
Denis Vlasenko
91dd275f05 split: let me join bikeshed painting frenzy :)
this one should be able to handle huge files.
   text    data     bss     dec     hex filename
    664       4       0     668     29c busybox.t0/coreutils/split.o
    628       0       0     628     274 busybox.t1/coreutils/split.o
split_main                                           488     525     +37
suffix_len                                             4       -      -4
next_file                                             77       -     -77
(add/remove: 0/2 grow/shrink: 1/0 up/down: 37/-81)            Total: -44 bytes
2007-03-26 20:15:40 +00:00
Bernhard Reutner-Fischer
576de34d1c - check the suffix proper plus misc touch up 2007-03-26 18:19:29 +00:00
Bernhard Reutner-Fischer
b813eaff23 - implement suffices as required by SUSv3
- fix glitch in next_file (suffices were exhaused too early).
2007-03-26 14:28:12 +00:00
Bernhard Reutner-Fischer
cd43dfdeec - shrink a tiny bit (-8b) 2007-03-26 10:46:31 +00:00
Bernhard Reutner-Fischer
10f8f5f443 - rough prototype for split(1). TODO: Still needs some love since it's way too big..
text	   data	    bss	    dec	    hex	filename
    602	      4	      0	    606	    25e	coreutils/split.o
2007-03-25 21:50:18 +00:00
Denis Vlasenko
9a1fa8cf07 cmp: support 3rd and 4th arguments if DESKTOP=y (needed for gcc build) 2007-03-21 22:30:14 +00:00
Denis Vlasenko
c86e052b81 fix accumulated whitespace and indentation damage 2007-03-20 11:30:28 +00:00
Denis Vlasenko
97fd6d81b4 ls: fix segfault-if-standalone-shell, add big fat comment. 2007-03-19 20:59:20 +00:00
Denis Vlasenko
16c7fb7fc5 chown, env: stop using statics 2007-03-14 22:08:04 +00:00
Denis Vlasenko
e1e93c1e1c missed hunk of "stop using big static buffer for inode hash" 2007-03-14 22:06:57 +00:00
Denis Vlasenko
39c651e909 introduce and use setfscreatecon_or_die
(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
2007-03-12 18:22:55 +00:00
Denis Vlasenko
1203c9bf2f next portion of selinux updates: chcon, runcon. From
Yuichi Nakamura <himainu-ynakam@miomio.jp>  
KaiGai Kohei <busybox@kaigai.gr.jp>
2007-03-11 22:16:02 +00:00
Denis Vlasenko
a4688bf55d fix buglets found by randomconfig run 2007-03-11 10:56:37 +00:00
Denis Vlasenko
49622d7846 selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft) 2007-03-10 16:58:49 +00:00
Denis Vlasenko
339f5eb2e0 printf: allow hex/oct numbers; move functions around
so that we have no forward declarations
2007-03-09 16:43:01 +00:00
Denis Vlasenko
02f0c4c2bf diff: failed to confirm "static bug" in gcc - reinstating statics.
microscopic code improvements.
2007-03-09 10:08:53 +00:00
Denis Vlasenko
8a91081d9d chown: fix comment, fix verbose message 2007-03-08 16:14:46 +00:00
Denis Vlasenko
cd27c42552 chown: support -H -L -P if ENABLE_DESKTOP
chmod: cosmetic fixes
expr: smallish help for dumb compilers
2007-03-08 13:37:43 +00:00
Denis Vlasenko
0085f231b2 diff: make -U0 work 2007-03-07 22:45:42 +00:00
Denis Vlasenko
8e858e2700 clean up accumulated whitespace damage 2007-03-07 09:35:43 +00:00
Denis Vlasenko
41cca2b4f5 who: stop using static buffer, small size optimizations 2007-03-07 00:07:42 +00:00
Denis Vlasenko
2110aa9ece ls: w/o -l follow symlinks to dirs for commandline args 2007-02-28 23:14:06 +00:00
Denis Vlasenko
cce38586ae start_stop_daemon: add -chuid support 2007-02-26 22:47:42 +00:00
Denis Vlasenko
54cf511ce1 sort: fix multiple -k (was ignoring all except last) 2007-02-17 18:11:45 +00:00
Denis Vlasenko
6089c2c31e diff: fix access past end of array 2007-02-11 19:07:03 +00:00
Denis Vlasenko
6ca0444420 syslogd: fix "readpath bug" by using readlink instead
libbb: rename xgetcwd and xreadlink
2007-02-11 16:19:28 +00:00
Denis Vlasenko
1d76f439da EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu> 2007-02-06 01:20:12 +00:00
Bernhard Reutner-Fischer
cbd6e65744 - fix buglet introduced in r17351 in find_param(). Closes #1193 2007-02-04 11:13:57 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Bernhard Reutner-Fischer
6a1829d90c - include busybox.h before looking at an eventual #if ENABLE_DESKTOP 2007-02-03 12:52:25 +00:00
Denis Vlasenko
a41fdf331a preparatory patch for -Wwrite-strings #1 2007-01-29 22:51:00 +00:00
Denis Vlasenko
e06bed30cf use bb_sanitize_stdio() where appropriate 2007-01-27 22:21:12 +00:00
Bernhard Reutner-Fischer
cd75a96f0f - sum -r TODO should not print the filename as oposed to -s
Unfortunately, without rewriting sum, this bugfix adds 19 (!) bytes.
2007-01-27 22:11:28 +00:00
Denis Vlasenko
fc7f92253a find: fix -mtime, -mmin, -perm (+ add symbolic perm handling)
chmod: better name for a variable
2007-01-26 23:00:05 +00:00
Bernhard Reutner-Fischer
84d2d493b4 - remove nested function. Saves ~30 bytes. 2007-01-24 21:38:10 +00:00
Bernhard Reutner-Fischer
d19f4aaa21 - small size tweak 2007-01-20 21:32:38 +00:00
Bernhard Reutner-Fischer
1118a1de46 - make pre SUSv3 option handling dependant on INCLUDE_SUSv2 2007-01-20 21:32:20 +00:00
Bernhard Reutner-Fischer
8b1ae45037 - small size tweak 2007-01-20 21:31:21 +00:00
Bernhard Reutner-Fischer
b31c252860 - reuse retval for the option handling.
- TODO add tee, readahead and splice support to uClibc and use it in busybox!
2007-01-20 21:30:49 +00:00
Bernhard Reutner-Fischer
088a212bf5 - small size tweaks 2007-01-20 21:29:50 +00:00
Bernhard Reutner-Fischer
ca5b35299e - make read_stduu() and read_base64() void, small size tweaks 2007-01-20 21:29:32 +00:00
Bernhard Reutner-Fischer
d58c19479d - small size tweak 2007-01-20 21:28:36 +00:00
Denis Vlasenko
e055443412 ls: stop doing time() for each file in "ls -l"
ls: use fully-buffered stdout (can it be problematic
on VERY slow/hanging NFS mounts?)
2007-01-19 22:03:06 +00:00
Denis Vlasenko
2405ad659e ls: use get_cached_username/groupname 2007-01-19 21:24:17 +00:00
Bernhard Reutner-Fischer
1a250d9f32 - reinstate paranoia check in wrapf(). 2007-01-18 08:41:22 +00:00
Denis Vlasenko
41aaefce71 stop using global variable needlessly 2007-01-18 00:53:35 +00:00
Bernhard Reutner-Fischer
79cc55975f - remove superfluous define that expanded to "!strcmp"
- remove some dead code
2007-01-17 19:46:46 +00:00
Bernhard Reutner-Fischer
8eb0549e5d - reuse return code of vsnprintf to avoid pulling in strlen 2007-01-17 19:46:33 +00:00
Bernhard Reutner-Fischer
94feb1c807 - merge display_changed() and display_all()
This one is a bit risky but did work for me in cursory testing..
2007-01-17 19:46:12 +00:00
Bernhard Reutner-Fischer
d4a745c3d4 - peruse get_terminal_width_height and remove legacy code for ancient
slowaris versions.
2007-01-17 19:45:36 +00:00
Bernhard Reutner-Fischer
a6e31ad834 - rewrite find_param to use index_in_str_array 2007-01-17 19:45:14 +00:00
Bernhard Reutner-Fischer
4950f010f3 - manually inline tty_value_to_baud and remove string_to_baud_or_die
(cleanup)
2007-01-17 19:44:59 +00:00
Bernhard Reutner-Fischer
21fc740023 - constify some read-only members and remove superfluous casts
(cleanup)
2007-01-17 19:44:24 +00:00
Bernhard Reutner-Fischer
4fa566d4ad - reuse option_mask32 for state-handling in main
- improve check for errors from fcntl
2007-01-17 19:42:30 +00:00
Denis Vlasenko
150f402b36 whitespace fixes (leading spaces to tab) 2007-01-13 21:06:21 +00:00
Denis Vlasenko
3a34d0c08a random small size optimizations 2007-01-12 22:10:34 +00:00
Denis Vlasenko
21b080daa8 stty: fix bug reported by Paul Albrecht <albrecht@rdi1.com> -
stty -echo didn't work. Introduced by me :(
2007-01-12 21:03:07 +00:00
Denis Vlasenko
f8abc100cc stty: rearrange functions, avoiding the need in forward declarations.
No other code chages.
2007-01-12 21:02:04 +00:00
Denis Vlasenko
f7996f3b70 Trailing whitespace removal over entire tree 2007-01-11 17:20:00 +00:00
Bernhard Reutner-Fischer
7ae93f0fe7 - FIXME: someone broke diff -r
- minor shrinkage i had lying around
   text	   data	    bss	    dec	    hex	filename
   7002	      8	     88	   7098	   1bba	diff.o.orig
   6936	      8	     81	   7025	   1b71	diff.o
2007-01-07 15:56:09 +00:00
Denis Vlasenko
b05955e0a5 work around gcc's false warning 2007-01-07 00:24:49 +00:00
Denis Vlasenko
8336f080cb diff: small optimizations; do not try to diff non-seekable stream
(currently we don't support that)
sort: fixes. testsuites fixed:
sort with non-default leading delim 1
sort with non-default leading delim 2
sort key doesn't strip leading blanks, disables fallback global sort
2007-01-07 00:21:41 +00:00
Bernhard Reutner-Fischer
ea9e35f5dd - minor shrinkage: -25 bytes or so. 2007-01-06 21:47:09 +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
6eebed561a chown: fix handling of "user.group" notation 2007-01-03 20:07:06 +00:00
Denis Vlasenko
ace35eeb88 Remove networking/libiproute/linux/pkt_sched.h
(and networking/libiproute/linux/ since it become empty).
Style fixes.
2007-01-02 16:32:16 +00:00
Mike Frysinger
a71199e0f0 str2u() is only used when FEATURE_SORT_BIG is enabled 2007-01-02 05:43:30 +00:00
Denis Vlasenko
6dc6ebbf44 awk: undo locale setting for numbers - or else parsing
can act quite mysteriously
date: add if(ENABLE_LOCALE_SUPPORT)
2007-01-01 23:53:12 +00:00
Denis Vlasenko
b2abef3e54 stty: fix width of a field for ppc32
sort: fix -u to match coreutils 6.3
msh: compile fix (my fault)
2007-01-01 18:18:04 +00:00
Denis Vlasenko
98ee06d3d4 stop using __u32 etc. uint32_t is there for a reason 2006-12-31 18:57:37 +00:00
Mike Frysinger
5dd76862ef Yann E. MORIN. writes: i pity the fool who doesnt use the z length modifier with size_t types 2006-12-31 11:34:17 +00:00
Denis Vlasenko
3bba545a54 done a dozen of randconfig test. guess what? ALL failed...
these are resulting fixes
2006-12-30 17:57:03 +00:00
Denis Vlasenko
7fa0fcafca fix build without shadow support 2006-12-28 21:33:30 +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
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
9ac9e55e3c sum: 40% size reduction (-300 bytes)
find: one_char -> LONE_CHAR
2006-12-23 15:58:11 +00:00
Denis Vlasenko
e31f721e14 tail: -50 text bytes 2006-12-22 16:06:16 +00:00
Denis Vlasenko
0849207ce0 convert "negaite" config option into reversed (INCLUDE_SUSv2) 2006-12-22 13:56:36 +00:00
Denis Vlasenko
afc9ff99fd removal of commented-out cruft 2006-12-22 00:45:27 +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
6910741067 tail: fix tail +N 2006-12-21 00:43:06 +00:00
Denis Vlasenko
b95636c52f remove casts from xmalloc() 2006-12-19 23:36:04 +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
f42ff90453 du: dietlibc compat fix, style fixes. Thanks to sampo@symlabs.com. 2006-12-18 21:22:16 +00:00
Denis Vlasenko
0f5905e617 od: remove bug-for-bug compat (because the bug was fixed in coreuitls) 2006-12-17 19:21:13 +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
6a1d661036 diff: fix -q exit code
last_char_is: sacrifice 9 bytes but avoid double-scan
2006-12-16 22:18:44 +00:00
Bernhard Reutner-Fischer
56b956952e - minor shrinkage 2006-12-14 11:27:58 +00:00
Bernhard Reutner-Fischer
5b6f776fe9 - remove warning about unused depth parameter in add_to_dirlist()
- make one variable static and add comment about why the other variables there are not static.
2006-12-13 16:50:15 +00:00
Denis Vlasenko
35a4bbe74f date: -R shouldn't use locale 2006-12-13 00:35:21 +00:00
Bernhard Reutner-Fischer
91d4a2dac3 - commentary typo 2006-12-02 20:47:36 +00:00
Denis Vlasenko
2425bdce34 od: fix buglet in --traditional, microoptimization,
document coreutils bug
bloat-o-meter: account for objects in rodata too
2006-11-29 14:32:01 +00:00
Denis Vlasenko
c61852a02b fix support for globally disabling --long-options.
(disabling them saves ~4K on fully configured bbox)
2006-11-29 11:09:43 +00:00
Denis Vlasenko
601ae1378b od: sometime ago I landed BIG od implementation
from coreutils. My fault. This commit contains
cleanups and size reductions.
2006-11-28 23:37:46 +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
459903bd4e Provide our own isdigit macro. saves more than 400 bytes. 2006-11-27 14:44:18 +00:00