Denis Vlasenko
04ea11b033
grep: fix grep -F -e str1 -e str2 (was matching str2 only)
...
by replacing "=" by "|=" here:
found |= strstr(line, gl->pattern) != NULL;
grep: optimization: stop on first -e match
grep: stop using bss. -40 bytes
2007-09-10 12:18:32 +00:00
Paul Fox
dcf9bba3b7
fix -xdev behavior in the presence of two or more nested mount points
...
on the command line, e.g. "find / /boot -xdev".
2007-09-06 17:45:16 +00:00
Denis Vlasenko
6ee023cf62
*: compile fixes for 64-bit build
2007-08-23 10:52:52 +00:00
Denis Vlasenko
fe7cd642b0
don't pass argc in getopt32, it's superfluous
...
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
838dacaa00
find: fix SELinux-related warning
2007-08-16 10:41:24 +00:00
Denis Vlasenko
319f8ebef8
httpd: round down sendfile byte count to 64k
...
*: style fixes
2007-08-13 11:09:30 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
f868963c67
multiplier suffixes are short, store them directly in struct suffix_mult
...
function old new delta
xstrtoul_range_sfx 226 217 -9
xstrtoull_range_sfx 291 280 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-20) Total: -20 bytes
text data bss dec hex filename
669128 2668 13616 685412 a7564 busybox_old
669108 2668 13616 685392 a7550 busybox_unstripped
2007-07-27 15:06:25 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
4652daace9
grep: implement -m MAX_MATCHES; fix help text
...
grep_file 771 822 +51
packed_usage 22573 22610 +37
.rodata 128058 128090 +32
grep_main 842 853 +11
max_matches - 4 +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 135/0) Total: 135 bytes
2007-07-15 12:39:08 +00:00
Denis Vlasenko
8d5aa870a6
grep: fix buglets with context printing
...
print_line 152 170 +18
did_print_line - 1 +1
grep_file 788 771 -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 19/-17) Total: 2 bytes
text data bss dec hex filename
673368 2740 13968 690076 a879c busybox_old
673368 2740 13968 690076 a879c busybox_unstripped
2007-07-15 12:38:18 +00:00
Denis Vlasenko
4b9b0ced30
find: fix build failure on certain configs
...
(found by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
2007-07-01 17:35:17 +00:00
Denis Vlasenko
99fcc62523
find: style fix
2007-07-01 17:29:44 +00:00
Denis Vlasenko
dc757aa16c
introduce and use bb_basename()
...
function old new delta
bb_basename - 26 +26
sv_main 1226 1225 -1
passwd_main 1985 1983 -2
showdirs 482 478 -4
sendCgi 1811 1807 -4
make_device 1354 1350 -4
handleIncoming 2443 2439 -4
func_name 82 78 -4
service_name 2292 2285 -7
main 909 901 -8
cmp_main 555 547 -8
test_main 434 422 -12
act 228 216 -12
find_pair 180 164 -16
rmmod_main 298 280 -18
find_pid_by_name 156 134 -22
modprobe_main 1606 1576 -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes
text data bss dec hex filename
734933 3028 14400 752361 b7ae9 busybox_old
734801 3028 14400 752229 b7a65 busybox_unstripped
2007-06-30 08:04:05 +00:00
Denis Vlasenko
a19faf8bb7
find: -context support for SELinux (KaiGai Kohei <kaigai@kaigai.gr.jp>)
...
find: make it a bit smaller
function old new delta
.rodata 129018 129050 +32
parse_params 1509 1346 -163
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 32/-163) Total: -131 bytes
2007-06-19 22:22:57 +00:00
Denis Vlasenko
53a0e97196
find: make -size match GNU find
2007-06-16 00:30:52 +00:00
Denis Vlasenko
b941129ccb
find: add conditional support for -maxdepth and -regex
...
(needed for Linux 2.6.22-rc4 build)
-maxdepth:
# size busybox_old busybox_unstripped
text data bss dec hex filename
675622 2792 15728 694142 a977e busybox_old
675770 2792 15728 694290 a9812 busybox_unstripped
-regex:
# size busybox_old busybox_unstripped
text data bss dec hex filename
675770 2792 15728 694290 a9812 busybox_old
675894 2792 15728 694414 a988e busybox_unstripped
2007-06-15 23:43:11 +00:00
Denis Vlasenko
9acfed2d14
grep: selection done by FEATURE_GREP_EGREP_ALIAS was broken, fix.
...
(Maxime Bizon <mbizon@freebox.fr> (Freebox))
2007-06-08 15:41:27 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
58394b1e29
xargs: simplify word list management
2007-04-15 08:38:50 +00:00
Denis Vlasenko
f5294e1f4c
hush: use NOFORK applets as appropriate. Net reduction of code size.
2007-04-14 10:09:57 +00:00
Denis Vlasenko
62f0479cf1
find: add support for -delete, -path (by Natanael Copa)
2007-04-13 10:00:12 +00:00
Mike Frysinger
3a62a737f7
make sure we free the grep data as well
2007-04-12 18:29:27 +00:00
Denis Vlasenko
51742f4bb0
style fixes. No code changes
2007-04-12 00:32:05 +00:00
Denis Vlasenko
8905496444
xargs: fix my brain fart (resulted in memory leak)
2007-04-10 21:41:16 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Denis Vlasenko
cd7001f705
factor out NOFORK/NOEXEC code from find. Use it for xargs too.
2007-04-09 21:32:30 +00:00
Denis Vlasenko
1b4b2cb20e
xargs: shrink code, ~80 bytes
...
applets.h: +#undef APPLET_NOEXEC
2007-04-09 21:30:53 +00:00
Denis Vlasenko
7e754f12d3
Implement first instance of NOFORK applet - echo
...
find: use NOFORK/NOEXEC; small -exec buglet also eliminated
vfork_daemon_rexec: honor PREFER_APPLETS
echo: small size improvements
find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
2007-04-09 13:04:50 +00:00
Denis Vlasenko
b04b4357ff
find: fix -prune more. Add big comment about it.
2007-04-08 11:10:43 +00:00
Denis Vlasenko
bbd695d801
find: fix handling of -prune
...
recursive_actions: uppercase flag constants
2007-04-08 10:52:28 +00:00
Bernhard Reutner-Fischer
6d79dd66cb
- size and prune were mixed up
2007-04-05 09:40:12 +00:00
Denis Vlasenko
7d6c9296e7
find: missed 'ststic' on const data
2007-04-05 00:35:43 +00:00
Denis Vlasenko
56fce00fc7
find: un-DESKTOPize (Kai Schwenzfeier <niteblade@gmx.net>)
...
find: -group, -depth (Natanael Copa <natanael.copa@gmail.com>)
find: make constant array static, declare PARM_xx constants with enum
2007-04-04 23:41:35 +00:00
Bernhard Reutner-Fischer
febe3c4211
- sed -e "s/char[[:space:]]*\*[[:space:]]*argv\[\]/char **argv/g"
2007-04-04 20:52:03 +00:00
Bernhard Reutner-Fischer
a87ed2c716
- use index_in_str_array also for find_main
...
text data bss dec hex filename
2605 1 12 2618 a3a find.o.r18274
2602 1 12 2615 a37 find.o.r18275
2007-03-29 13:56:49 +00:00
Bernhard Reutner-Fischer
307d27df4f
- remove bloated switch statement.
...
text data bss dec hex filename
2706 1 12 2719 a9f find.o.r18273
2605 1 12 2618 a3a find.o.r18274
2007-03-29 13:56:02 +00:00
Bernhard Reutner-Fischer
557b458767
- implement a TODO: Use index_in_str_array in parse_params
...
text data bss dec hex filename
2771 1 12 2784 ae0 find.o.r18272
2749 1 12 2762 aca find.o.-try-switch
2706 1 12 2719 a9f find.o.r18273
2007-03-29 13:55:17 +00:00
Bernhard Reutner-Fischer
32773aca55
- Purely cosmetic type fiddling
2007-03-29 13:54:17 +00:00
Bernhard Reutner-Fischer
3e816c1252
- fold recurse, depthFirst and dereference params into one param flags.
...
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-29 10:30:50 +00:00
Denis Vlasenko
f8ea0f3a66
grep: "implement" -a and -I by ignoring them
2007-02-25 02:38:54 +00:00
Denis Vlasenko
385304d449
grep: implement -w
2007-02-25 02:38:20 +00:00
Denis Vlasenko
4222ae440a
ash: replace xstrdup (shell shall not die)
...
grep: fix mis-indented block
2007-02-25 02:37:49 +00:00
Denis Vlasenko
b292264bfd
find: fix -not support
2007-02-06 17:38:29 +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
7154b99c89
- improve wording
2007-02-04 17:24:53 +00:00
Bernhard Reutner-Fischer
01986e9c6f
- remove duplicate menu entry
2007-02-04 17:21:55 +00:00
Denis Vlasenko
cf787cf3a5
find: support for !
2007-02-04 17:11:25 +00:00
Bernhard Reutner-Fischer
10b7996c1b
- strip 12 bytes off by using a smaller type for need_print.
...
- add TODO to switch this applet to index_in_str_array()
2007-02-04 16:09:04 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
4c97863109
assorted fixes for bugs found with randomconfig
2007-02-03 03:31:13 +00:00
Denis Vlasenko
a100707c04
find -user support by Natanael Copa <natanael.copa@gmail.com>
2007-02-02 01:17:52 +00:00
Denis Vlasenko
ab2aea4447
preparatory patch for -Wwrite-strings #4
2007-01-29 22:51:58 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
434ad5456b
fix warning in find.c
2007-01-27 13:45:17 +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
Denis Vlasenko
769d1e05e6
fix warning from needlessly-global functions
2007-01-22 23:04:27 +00:00
Denis Vlasenko
c9d34da375
find: fix misplaced #else (fix by Harald Kuthe <trhoudini@hotmail.com>)
2007-01-03 03:15:58 +00:00
Denis Vlasenko
666da5e2c6
merge post-1.3.0 fixes
2006-12-26 18:17:42 +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
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
4cccc03768
remove useless casts (type*) xzalloc(...)
2006-12-22 18:37:07 +00:00
Denis Vlasenko
5fa7148761
build system: add "release" target
...
find: support -size N (needed for above)
2006-12-12 22:31:15 +00:00
Denis Vlasenko
9225854144
mostly style fixes
2006-11-01 10:25:35 +00:00
Denis Vlasenko
31c65f2456
find: -type T was actually meaning ! -type T!
...
With this fix, "make mrproper" works correctly
2006-10-31 23:39:37 +00:00
Denis Vlasenko
5f18e7ca33
find: implement -prune. "make clean" now works! :)
2006-10-31 03:21:02 +00:00
Denis Vlasenko
a3b4fed8b3
find: fix implicit -print (sometime differed from standard)
2006-10-31 03:20:13 +00:00
Denis Vlasenko
6191a7a007
find: implement ( )
2006-10-30 02:10:47 +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
e2fb719ba3
find: small improvement
2006-10-29 19:03:56 +00:00
Denis Vlasenko
df0553bbd2
find: fix -exec to work like stock find does.
2006-10-29 00:21:47 +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
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
2295b49169
grep: "grep -h pattern file1 file2" ignored -h
...
(precluded kernel's "make modules")
2006-10-22 11:42:51 +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
bf39216cc4
grep: -r didn't close files, producing "Too many open files"
2006-10-15 18:38:01 +00:00
Denis Vlasenko
3544ae6004
grep: fix combination of -r and -h
2006-10-14 14:51:59 +00:00
Denis Vlasenko
3a6755f56f
grep: add support for -r
2006-10-14 14:24:30 +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
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49: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
9275814a9e
lots of silly indent fixes
2006-10-03 19:56:34 +00:00
Denis Vlasenko
6c30db8bd3
grep: add help text; fix style
2006-09-29 21:04:12 +00:00
Denis Vlasenko
51937534fb
grep: implement -o option. Patch by Jac Goudsmit.
2006-09-29 20:58:53 +00:00
Denis Vlasenko
6248a734e2
xargs: simplify option parsing
2006-09-29 08:20:30 +00:00
Eric Andersen
3312c989e6
fix 'grep -C' which requires an argument
2006-09-25 22:18:56 +00:00
Rob Landley
e9a7a6212b
Change license statements (and clean up headers) on some of the files that
...
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +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
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
Mike Frysinger
441bfbf143
make the -0 xargs option a little more clear
2006-07-03 05:19:44 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Bernhard Reutner-Fischer
e15d7573a1
- move #include busybox.h to the very top so we pull in the config
...
and eventual platform specific includes in early.
2006-06-02 20:56:16 +00:00
Bernhard Reutner-Fischer
95a040fac8
- use the defines CURRENT_TTY and VC_1; also shrink xargs a tiny bit:
...
add/remove: 0/0 grow/shrink: 2/6 up/down: 5/-37 (-32)
function old new delta
static.add_interface 271 274 +3
static.glob3 36 38 +2
static.renice_main 409 408 -1
static.readcmd 1083 1081 -2
static.changepath 176 174 -2
static.parse_opts 56 51 -5
static.rx_main 1095 1088 -7
static.xargs_main 759 739 -20
----------------------------------------------------------------
Result :-) -32
2006-05-27 09:36:43 +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
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
Paul Fox
d7384296f6
implement -print0 for find
2006-05-12 14:47:20 +00:00
Rob Landley
2ec922eed5
Patch from Robert P Day: let menuconfig indent stuff for us, we don't have
...
to do it in Config.in.
2006-04-13 23:22:16 +00:00
Paul Fox
8416a2d558
prevent find from ever descending into an xdev'ed directory.
2006-03-27 16:42:33 +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
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
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
"Vladimir N. Oleynik"
716bbe96d4
make grep faster (close bug 758), reduce small memory leak in CONFIG_FEATURE_CLEANUP mode
2006-02-28 10:10:19 +00:00
Rob Landley
d6e14d8bee
Don't build directory libraries unless we're building an applet that needs it.
...
Cherry-picked from Devin Bayer's big MacOS X patch.
2006-02-21 19:11:35 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
59c4e5cf92
removed warning "comparison between signed and unsigned". Added ATTRIBUTE_UNUSED. My whitespace
2006-01-30 13:51:50 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +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
Paul Fox
72d1a2357d
add find's "-mmin" option. configurable.
2006-01-13 21:05:41 +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
Rob Landley
cee605c525
The supposedly trivial CONFIG->ENABLE conversion wasn't so trivial. The
...
-exec feature shouldn't be tangled up with this, so revert everything but
the new exec feature for the moment.
2005-10-06 16:39:17 +00:00
Rob Landley
5d3a0e8ed3
Add find -exec support from Rob Sullivan, and convert CONFIG_ to ENABLE_
...
while we're in the area.
2005-10-04 03:34:39 +00:00
Mike Frysinger
62f18e1f20
use the shorter license header
2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5
use brief license line
2005-09-24 06:01:57 +00:00
Bernhard Reutner-Fischer
aaf0e23330
- replace variables by defines to save space
...
- rename string denoting stdin from "-" to "(standard input)" to match
GNU grep.
2005-09-23 15:38:49 +00:00
"Vladimir N. Oleynik"
bf4497406f
SUSv3 -q compatibily exit status correction for grep again
2005-09-23 13:50:24 +00:00
"Vladimir N. Oleynik"
c96b703ab0
SUSv3 -q compatibily exit status correction for grep
2005-09-23 13:44:03 +00:00
"Vladimir N. Oleynik"
cf40d8175b
grep must have exit code >1 if input file not found. Small indent correcion also.
2005-09-23 13:23:15 +00:00
"Vladimir N. Oleynik"
007a011647
network "default" --> bb_INET_default. Reduce 2 exported from find applet
2005-09-22 11:11:11 +00:00
"Vladimir N. Oleynik"
23f62fc6f3
split libbb: moved xregcomp separatelly for speed up recompile
2005-09-14 16:59:11 +00:00
"Vladimir N. Oleynik"
b4f3cff6f5
removed strange extern void xregcomp(... from some applets, but declared from libbb.h
2005-09-14 16:22:50 +00:00
"Vladimir N. Oleynik"
27421a1878
1) bb_opt_complementaly -> bb_opt_complementally
...
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Mike Frysinger
15ca58648a
patch by srowe in Bug 359 to fix fgrep aliasing
2005-07-31 22:41:05 +00:00
Mike Frysinger
4d00896d05
use toplevel ARFLAGS and update default ARFLAGS to be quiet
2005-07-27 01:09:24 +00:00
Eric Andersen
14f5c8d764
Patch from Bernhard Fischer to make a bunch of symbols static
...
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Mike Frysinger
5ba5f4d2e7
In Bug 78, shortkey points out:
...
If you run `grep -h . file1 file2 file3 ...`, the output is not prefixed
with the filename. If you run `grep -h . file1` however, the filename
will incorrectly prefix the output.
2005-04-16 04:56:11 +00:00
Eric Andersen
31c27a9c65
Hiroshi Ito writes:
...
Hello
I'm using busy box on mipsel machine.
"grep -f file" will cause segmentation fault.
Vladimir N. Oleynik writes:
Hiroshi,
Thank for bug report, but your patch is full broken.
Worked patch attached.
(really changes is zero initialize, and indent correcting).
--w
vodz
2004-10-08 08:10:57 +00:00
Eric Andersen
7daa076d3e
egor duda writes:
...
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
2004-10-08 07:46:08 +00:00
Eric Andersen
abc513a90f
Make the grep option values a bit less horrible
2004-05-26 11:48:29 +00:00
Eric Andersen
dec7f81370
Rick Richardson writes:
...
Here is a patch that adds egrep -L support (the opposite of egrep -l).
I realize this is probably too late for 1.0. But I offer it for your
future consideration.
egrep -L is used in some networking startup scripts I inherited.
-Rick
2004-05-26 11:47:55 +00:00
Eric Andersen
7f164cd052
Patch from vodz to correct 'grep -e pattern1 -e pattern2' logic
2004-05-26 09:46:41 +00:00
Eric Andersen
aff114c33d
Larry Doolittle writes:
...
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.
Erik - please apply.
Authors - please check that I didn't corrupt any meaning.
Package importers - see if any of these changes should be
passed to the upstream authors.
I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.
What is "pretect redefined for test" in cmdedit.c?
Good luck on the 1.00 release!
- Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
252183e3f5
Try to make indent formatting less horrible
2003-10-31 08:19:44 +00:00
Glenn L McGrath
40c9489d33
Add a comment with link to the SUSv3 standard for xargs
2003-10-30 22:51:33 +00:00
Glenn L McGrath
09c295a5bc
run through indent
2003-10-30 22:47:16 +00:00
Eric Andersen
88c916bdec
Andreas Mohr writes:
...
the busybox menuconfig triggered my "inacceptable number of spelling mistakes"
upper level, so I decided to make a patch ;-)
I also improved some wording to describe some things in a better way.
Many thanks for an incredible piece of software!
Andreas Mohr, random OSS developer
2003-10-22 09:58:56 +00:00
Glenn L McGrath
d12061b299
Vodz last_patch_117, update options for new xargs
2003-10-10 23:15:23 +00:00
Glenn L McGrath
61796945e3
Vods versions of xargs
2003-10-10 12:10:18 +00:00
Glenn L McGrath
99825960c1
Bugfix for xargs
2003-10-09 11:06:45 +00:00
Glenn L McGrath
add3eadc46
Add the x, n, s and E options, remove -r as its expected behaviour.
2003-10-04 14:44:27 +00:00
Glenn L McGrath
07cf92676a
Dont mix xarg options with utility option, fixes example of
...
`echo "README" | xargs ls -al`
Dont specify a path for the default behaviour of echo
args allocated space for an extra ptr
Use defines for the different options
2003-10-03 13:15:44 +00:00
Eric Andersen
cb81e6484d
Update a bunch of docs. Run a script to update my email addr.
2003-07-14 21:21:08 +00:00
Eric Andersen
e5642119ee
Patch from Thomas Cameron:
...
Hello all,
This patch adds more "Help" text to the config system. Almost
all applets now have a help entry. Also, I cleaned up the spacing of
the existing text so that things are consistent. This patch is against
this morning's CVS.
Thomas Cameron
CEI Systems, Inc.
2003-07-14 19:37:08 +00:00
Eric Andersen
fb0c6af286
Patch from Lars Kellogg-Stedman:
...
The attached two patches add config documentation to init/Config.in and
fileutils/Config.in.
2003-07-14 19:18:43 +00:00
Eric Andersen
65e20a33c2
Patch from Kent Robotti adding a bunch of needed docs!
...
-Erik
2003-07-05 07:52:35 +00:00
Eric Andersen
8876fb2f59
last_patch89 from vodz:
...
Manuel,
I rewrite bb_getopt_ulflags() function for more universal usage.
My version support now:
- options with arguments (optional arg as GNU extension also)
- complementaly and/or incomplementaly and/or incongruously and/or list
options
- long_opt (all applets may have long option, add supporting is trivial)
This realisation full compatibile from your version.
Code size grow 480 bytes, but only coreutils/* over compensate this size
after using new function. Last patch reduced over 800 bytes and not full
applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate
trivial addition support long_opt with usage new bb_getopt_ulflags().
Complementaly and/or incomplementaly and/or incongruously and/or list options
logic is not trivial, but new "cut" and "grep" applets using this logic
for examples with full demostrating. New "grep" applet reduced over 300
bytes.
Mark,
Also. I removed bug from "grep" applet.
$ echo a b | busybox grep -e a b
a b
a b
But right is printing one only.
--w
vodz
2003-06-20 09:01:58 +00:00
Glenn L McGrath
c91ce57099
Config option to create an fgrep alias
2003-04-27 02:43:54 +00:00
Glenn L McGrath
c5408fe7f7
Fix segfault when cleaning up
2003-04-27 02:22:01 +00:00
Glenn L McGrath
26df70a823
grep -f support, adds only 60 Bytes, but regex's now compiled as
...
required, rather than being pre-compiled.
2003-04-27 01:50:57 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Eric Andersen
97d86f2bb5
Apply patch from Ghozlane Toumi to add -inum support to find.
...
Apply patch from Ghozlane Toumi to make find smaller by combining
similar error messages
Forward port find -newer support from busybox stable that was
missing from unstable. -Erik.
Fixup usage messages for find. -Erik
2003-01-23 05:27:42 +00:00
Glenn L McGrath
49b0f86043
Fix -mtime, by Ian Abbott
2002-12-11 21:22:21 +00:00
Eric Andersen
c9f20d9fb9
Yet another major rework of the BusyBox config system, using the considerably
...
modified Kbuild system I put into uClibc. With this, there should be no more
need to modify Rules.mak since I've moved all the interesting options into the
config system. I think I've got everything updated, but you never know, I may
have made some mistakes, so watch closely.
-Erik
2002-12-05 08:41:41 +00:00
Aaron Lehmann
a170e1c858
Change if(x)free(x); to free(x);
2002-11-28 11:27:31 +00:00
Glenn L McGrath
8f0722a53b
Move readlink, mktemp, run-parts and which to a new debianutils dir.
2002-11-11 03:00:12 +00:00
Glenn L McGrath
f57674e9a9
Rewrite of xargs by Vladimir N. Oleynik
2002-11-10 21:47:17 +00:00
Eric Andersen
d4ee98940b
last_patch55 from vodz:
...
I found overflow problem in xargs applet
(allocated not space for trailing '\0').
Last patch also reduce 22 bytes size. ;)
2002-09-16 10:44:24 +00:00
Robert Griebl
0d833ca7fd
Fixed a bug in xarg: string data was strcat'ed to a malloc'ed buffer - and
...
malloc does not clear memory by default (somehow this worked on x86, but
not on arm)
2002-08-03 14:49:03 +00:00
Robert Griebl
41369af3f2
Patch for bug #1183 : Added a -xdev option to find (configurable)
2002-07-24 00:34:48 +00:00
Eric Andersen
85208e2ab9
Completely rework the config system so that it no longer annoys me to work on
...
the busybox development tree. This eliminates the use of recursive make, and
once again allows us to run 'make' in a subdirectory with the expected result.
And things are now much faster too. Greatly improved IMHO...
-Erik
2002-04-12 12:05:57 +00:00
Matt Kraai
eed9451cf6
* findutils/grep.c (grep_main): Remove unnecessary use of junk.
2002-02-22 22:08:16 +00:00
Matt Kraai
a3181dd833
Do not segfault if PATH is unset.
2002-01-14 18:30:10 +00:00
Matt Kraai
1f0c43668a
Remove == TRUE' tests and convert
!= TRUE' and `== FALSE' tests to use !.
2001-12-20 23:13:26 +00:00
Matt Kraai
585f657e2d
Fix undeclared variable error.
2001-11-20 16:00:44 +00:00
Eric Andersen
81ee96fe62
Usr get_last_path_component() name basename()
2001-11-20 00:23:48 +00:00
Eric Andersen
6f8b7ea452
oops
2001-11-19 11:45:39 +00:00
Eric Andersen
55805bcba4
More scrubbing
2001-11-19 10:59:37 +00:00
Eric Andersen
d81891a2e6
Call xmalloc before realloc
2001-11-19 10:49:30 +00:00
Eric Andersen
43626d7671
Fixup CLEANUP behavior
2001-11-19 10:36:20 +00:00
Matt Kraai
a21c24bf03
Convert strdup call to xstrdup, and calloc calls to xcalloc (patch from
...
Steve Merrifield).
2001-11-12 16:58:07 +00:00
Eric Andersen
dba4e6f046
Add in grep -E support
2001-11-10 12:54:00 +00:00
Eric Andersen
7131213460
config.in features patch from Giulio Orsero <giulioo@pobox.com>
...
with some minor edits from me
2001-11-10 09:53:23 +00:00
Matt Kraai
bb0088e980
Make egrep only set REG_EXTENDED flag.
2001-10-31 16:16:31 +00:00
Eric Andersen
ccd96f1972
Patch from Charles Steinkuehler <charles@steinkuehler.net>
...
to properly handle extended regexps for egrep
2001-10-31 10:02:46 +00:00
Matt Kraai
999623e973
Use extended regular expressions when invoked as egrep (noted and initial
...
patch by Charles Steinkuehler).
2001-10-29 15:49:03 +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
74400ccfd0
Scrub up some function prototypes.
...
-Erik
2001-10-18 04:11:39 +00:00
Eric Andersen
0034443140
Fix behavior of grep -lc to match GNU grep. SuS2 is ambiguous
...
on the correct behavior, so acting like GNU grep seems best
-Erik
2001-07-31 23:18:49 +00:00
Eric Andersen
86f0167e39
grep failed to compile when BB_FEATURE_CLEAN_UP was defined -- types were wrong.
2001-05-29 22:36:39 +00:00
Mark Whitley
fa43e54b6f
Added support for grep -e and grep -f, closes bug #1164 . Also added some
...
testcases for these new features.
2001-05-24 18:36:18 +00:00
Matt Kraai
edc806507c
Fixed extra -- lines (noted by Christophe Boyanique).
2001-05-22 14:29:27 +00:00
Mark Whitley
1d9d41150b
Fixed mishandling of -c & -l options and accounted for case when we're
...
grepping only one file.
2001-05-21 21:13:00 +00:00
Matt Kraai
59df6f7398
Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.c
...
by Larry Doolittle.
2001-05-16 14:21:09 +00:00
Mark Whitley
35e59bed97
Fixed a subtle bug in the handling of -l and -c flags.
2001-05-14 19:40:32 +00:00
Eric Andersen
8d35134ad8
A bug fix from Vladimir for a memory leak I stupidly
...
added to which.c.
2001-05-07 22:45:06 +00:00
Eric Andersen
044a72d0d5
Larry suggested using concat_path_file() would be an even safer bet
...
for 'which'. I ageed, so I whipped this up -- which revealed a bug in
concat_path_file. It turns out that that a '/' can be appended from
either the path _or_ the filename, but only the former was checked.
-Erik
2001-05-04 22:04:24 +00:00
Eric Andersen
7526f035f4
Fix a buffer overflow. Which accounted for the size of the path, plus the the
...
'/', plus the size of the test command. It did not account for the terminating
NULL, which overwrote the end of the string.
-Erik
2001-05-04 20:47:33 +00:00
Mark Whitley
59a86cad67
The tiniest of bracket-placement fixes.
2001-04-17 17:30:44 +00:00
Eric Andersen
303dd28bb0
Make 'grep -l' work
2001-04-09 23:26:31 +00:00
Mark Whitley
4391a16c92
Fixed option parsing. Grep would continue grepping, even when given a bad /
...
invalid option. Closes bug #1146 .
2001-04-09 23:00:07 +00:00
Mark Whitley
e0a7f917c2
Applied patch from David Douthitt to re-add -print option to find.
...
Closes bug #1144 .
2001-03-28 22:04:42 +00:00
Eric Andersen
6f3240abf9
xstrdup xargs cleanup from Jeff Garzik
2001-03-23 17:11:22 +00:00
Eric Andersen
8d4c397d9d
Patch from Jeff Garzik marking a few 'getopt not needed' apps.
2001-03-09 21:28:09 +00:00
Eric Andersen
cbe31dace5
It turns out that DODMALLOC was broken when I reorganized busybox.h
...
header file usage before the 0.49 release. To fix it, I had to move
the '#include "busybox.h"' to the end of the list of #include files.
-Erik
2001-02-20 06:14:08 +00:00