Rob Landley
08abe64d91
Selinux fix from Jan Kiszka.
2006-03-01 20:48:44 +00:00
"Vladimir N. Oleynik"
5c2b238b3a
more busybox's style: close bug 745
2006-02-28 10:15:42 +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
Rob Landley
73a20f3551
"sed 2 -2 10" was very unhappy. Made the thing bigger fixing it,
...
fiddled a bit to get the size back down as much as I could...
2006-02-23 19:54:48 +00:00
Rob Landley
0a7c8ef6e2
Patch from Denis Vlasenko to constify things and fix a few typos.
2006-02-22 17:01:00 +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
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
Rob Landley
c5789a6e23
Walter Harms added -D to date, and I did a code cleanup while I was in the
...
area. Probably broke something...
2006-02-21 05:06:42 +00:00
Mike Frysinger
dfd902b7ff
rfelker writes in Bug 736: stty.c includes unneeded, obsolete header memory.h
2006-02-19 22:43:58 +00:00
Mike Frysinger
4b33f7aa41
rfelker writes in Bug 734: Nothing from err.h is used, but cal.c includes it, breaking compile on systems lacking this function.
2006-02-19 22:41:41 +00:00
Rob Landley
02794e1516
Fix bug 674: sum's block count should always round up.
2006-02-14 17:47:05 +00:00
Rob Landley
30a6bba65f
Bug 677: there are apparently still people using telnet.
2006-02-06 02:49:45 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
"Vladimir N. Oleynik"
87be316149
more better for me signed<->unsigned and the const keyword usage
2006-01-31 14:25:52 +00:00
"Vladimir N. Oleynik"
57545c810a
avoid signed<->unsigned warning
2006-01-31 12:06:57 +00:00
Eric Andersen
5e678873f9
clean up yet more annoying signed/unsigned mismatches and fixup
...
yet more incorrect types
2006-01-30 19:48:23 +00:00
Bernhard Reutner-Fischer
4bf31272ff
- very minor tweak: save 1 byte.
...
statistics:
text data bss dec hex filename
867 0 12 879 36f fold.o.oorig.gcc-3.3
843 0 12 855 357 fold.o.oorig.gcc-3.4
780 0 12 792 318 fold.o.oorig.gcc-4.0
761 0 12 773 305 fold.o.oorig.gcc-4.1-HEAD
761 0 12 773 305 fold.o.oorig.gcc-4.2-HEAD
866 0 12 878 36e fold.o.gcc-3.3
842 0 12 854 356 fold.o.gcc-3.4
779 0 12 791 317 fold.o.gcc-4.0
760 0 12 772 304 fold.o.gcc-4.1-HEAD
760 0 12 772 304 fold.o.gcc-4.2-HEAD
2006-01-30 17:41:06 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +00:00
"Vladimir N. Oleynik"
676b15e067
removed warning "comparison between signed and unsigned".
2006-01-30 13:47:19 +00:00
"Vladimir N. Oleynik"
9b9a920eef
removed warning "comparison between signed and unsigned". Reduced size
2006-01-30 12:23:46 +00:00
"Vladimir N. Oleynik"
e75b41d990
support GNU suffixes for fancy mode: b(512), k(1024) and m(1024*1024)
2006-01-30 11:15:11 +00:00
"Vladimir N. Oleynik"
b1fd52e0b7
remove outdated and do not corected comment. Use bb_xasprintf instead xmalloc+set+set+strcpy.
2006-01-30 10:49:14 +00:00
Rob Landley
f8fd4db92f
Move SUSv2 obsolete feature disabling to debug menu, invert meaning of
...
symbol (switched on to remove now: test your apps to make sure they _don't_
do this, because as some point we should just yank it), fixup head/tail/fold.
Also tweak "make allyesconfig" so anything starting with CONFIG_DEBUG gets
left switched off. Possibly other things we want to put in the debug menu?
2006-01-30 01:30:39 +00:00
"Vladimir N. Oleynik"
8aa9e57149
support 64 arith. Close bug 136
2006-01-25 13:56:03 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b
- add platform.h.
...
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
96002bba67
- cleanup Config.in. Use "select CONFIG_FOO" and add the corresponding
...
"depends on CONFIG_BAR" instead of the if !CONFIG_FOO ...default y stanza.
2006-01-19 14:42:23 +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
Rob Landley
fb8c4983a6
Fix bug 603: "chown :root thingy" should work now.
2006-01-09 03:45:43 +00:00
Rob Landley
251161f75c
Bug 624 wants quoted char support for printf, so you can do something like:
...
printf '%d\n' '"x"'
and have it print out 120. This is the smallest implementation I can think
of at the moment.
2006-01-06 20:28:05 +00:00
Rob Landley
f8ec1b51f3
No, we _want_ the suid and sgid bits reverted by chown, for security reasons.
...
They mean something different when the user they're switching to is different,
so if you still want suid you reset it afterwards. This is a safety feature.
2006-01-06 18:22:05 +00:00
Bernhard Reutner-Fischer
9a14bd04f8
- Stephane Billiart writes:
...
Fix the compilation of head and tail.
thanks!
2005-12-15 11:47:16 +00:00
Rob Landley
164c5c80ba
Eliminate unnecessary allocation from md5sum that was leaked without ever being used.
2005-12-15 06:51:52 +00:00
Bernhard Reutner-Fischer
5816ccb190
- wrap label GET_COUNT in #if ENABLE_FEATURE_FANCY_applet to avoid warning
...
about unused label.
2005-12-13 10:48:45 +00:00
Rob Landley
a75c180e53
Bug 310: be consistent about stat/lstat and chown/lchown to avoid accidentally
...
modifying permissions or ownership when twiddling symlinks.
2005-12-12 06:58:53 +00:00
Rob Landley
cdbae77823
printf() arguments shouldn't be passed straight from user supplied data.
...
(Security thingy.)
2005-12-12 06:49:33 +00:00
Glenn L McGrath
0bd0257fe0
Add build options to control SuS compatability, allows numeric
...
option handling to be disabled.
Defaults to enabled, so no changes in default behaviour
2005-12-11 03:09:05 +00:00
Bernhard Reutner-Fischer
d77b781c1f
- remove unused variable have_read_stdin
...
- use FLAG_WIDTH
2005-12-10 20:13:54 +00:00
Paul Fox
377bdaff3b
avoid mixed declarations, to support older compilers just a little longer.
2005-12-08 18:48:20 +00:00
Rob Landley
746cfc8bf0
Another cleanup patch that's been in my tree for a while. Again I think it's
...
originally from Bernhard Fischer...
2005-12-02 17:55:45 +00:00
Rob Landley
2f30932eca
Fix cp /dev/null filename, and a few in-passing cleanups.
2005-11-01 21:55:14 +00:00
Bernhard Reutner-Fischer
47ea7b7f96
- Matthias Wenzel writes:
...
without the fix below md5sum will always report a correct md5 on _any_
wrongly formattet input files.
- use short boilerplate and remove superfluous keyword extern.
2005-10-27 14:43:27 +00:00
Bernhard Reutner-Fischer
ab1878245c
* uniq.c: remove unneeded include and use short boilerplate.
...
* coreutils.h: remove prototype of non-existing xgetoptfile_sort_uniq
and add boilerplate.
* networking/{ipaddr,ip,iplink,iproute,iptunnel}.c: touch includes
and use short boilerplate.
* libiproute/iproute.c: rename round to avoid clashes with older
SuSE gcc and use short boilerplate.
2005-10-26 10:47:26 +00:00
"Vladimir N. Oleynik"
1f0262bcdb
another more const
2005-10-20 11:17:48 +00:00
"Vladimir N. Oleynik"
a2eec6051f
RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1
2005-10-15 13:45:32 +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"
3ade65fc04
remove 1 CR, correct strange bb_opt_complementally, add #if 0 and XXX-comment: pleace examine this\!
2005-10-12 14:36:42 +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
ae907f38f0
When lstat returns an error (such as file not found), the value of
...
st_mode is random garbage (under uClibc), leading to random triggering
of the S_ISDIR() case when the destination will be a normal file which
doesn't exist yet. I.E. checking the return value of lstat is not optional.
2005-10-09 11:16:01 +00:00
Rob Landley
f1048143ee
Rob Sullivan added character and equivalence classes to tr. I changed some
...
comments.
2005-10-08 21:21:08 +00:00
Rob Landley
45ad0e87d6
Rename CONFIG_SORT_BIG to CONFIG_FEATURE_SORT_BIG so allbareconfig can find it.
2005-10-08 17:48:25 +00:00
"Vladimir N. Oleynik"
b31cb87fdc
to bb_getopt_ulflags()
2005-10-06 15:30:17 +00:00
"Vladimir N. Oleynik"
ba248206fe
change strange depend to libbb.h, but require busybox.h
2005-10-06 15:18:09 +00:00
"Vladimir N. Oleynik"
39a841cecf
change interface to bb_xasprintf() - more perfect for me.
...
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
Mike Frysinger
7f8797c8ee
re-order a little for alphabetical
2005-09-24 23:15:28 +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
"Vladimir N. Oleynik"
1f0ac23c20
very small size reduce for nohup applet
2005-09-22 13:26:23 +00:00
Bernhard Reutner-Fischer
9d7010ca86
- add applet nohup(1)
2005-09-21 18:25:05 +00:00
Bernhard Reutner-Fischer
d5bd137a24
- rename libbb's password helpers as suggested in libbb.h
...
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
2005-09-20 21:06:17 +00:00
Manuel Novoa III
84b93f7ef1
Get rid of warnings, remove compat with older gnu uniq to truly conform to susv3, and cut size a bit.
2005-09-15 08:06:42 +00:00
Rob Landley
b7128c6236
Cleanup patch by Bernhard Fischer, removing unnecessary includes of
...
getopt.h, whitespace changes, typos, etc.
2005-09-11 01:05:30 +00:00
Mike Frysinger
db289b258d
use CONFIG_BUFFER macros like cow suggested and shrink code size some more by using less variables and more gotos ;)
2005-09-10 04:10:18 +00:00
Rob Landley
98ea849623
Patch from Dirk Clemens so df doesn't run numbers together on drives >100gig.
2005-09-10 02:59:35 +00:00
Mike Frysinger
a80b290e30
some tweaks by cow to shrink a little
2005-09-10 02:47:19 +00:00
Manuel Novoa III
415f6c9628
Rob, I don't know why you feel some unexplainable compulsion to get rid of
...
a meaningless warning. But I do expect you preserve the coding style
and variable names when all you're doing is tweaking some of my code.
I repeat... do NOT change whitespace, variable names, or coding style in
any of my code simply to conform to your coding style.
2005-09-08 06:02:49 +00:00
Rob Landley
14efdc58ce
Don't comment warnings. Don't put #warnings about warnings. _FIX_ warnings.
...
This fixes the warning, and makes the binary smaller out of sheer pique.
(Yes, since Manuel did this one it's nice tight code that took several
attempts to shrink, but I was ticked.)
Add the start of a test for uniq; this is about the first 1/3 of the
tests we need for full susv3 coverage of uniq.
2005-09-07 04:18:36 +00:00
Rob Landley
1283a150ae
Whitespace-level changes. Replace s0,s1,e0,e1 with real variable names and
...
clean up whitespace and curly brackets a bit. Resulting binary should be
identical.
2005-09-06 01:57:11 +00:00
"Vladimir N. Oleynik"
a8c23aa795
- usage fresh bb_getopt_ulflags for ls -- very size reduce.
...
- small indent corrections
- remove unecessary malloc and free
2005-09-05 15:06:57 +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
Rob Landley
f815469a76
Bernhard Fischer trimmed down dos2unix a bit.
2005-09-01 03:11:19 +00:00
Rob Landley
58a651b2e5
Very minor tweak to tail.
2005-08-13 00:35:00 +00:00
Rob Landley
6a6798b8e4
Major rewrite of mount, umount, losetup. Untangled lots of code, shrunk
...
things down a bit, fixed a number of funky corner cases, added support for
several new features (things like mount --move, mount --bind, lazy unounts,
automatic detection of loop mounts, and so on). Probably broke several
other things, but it's fixable. (Bang on it, tell me what doesn't work for
you...)
Note: you no longer need to say "-o loop". It does that for you when
necessary.
Still need to add "user mount" support, which involves making mount suid. Not
too hard to do under the new infrastructure, just haven't done it yet...
The previous code had the following notes, that belong in the version
control comments:
- * 3/21/1999 Charles P. Wright <cpwright@cpwright.com>
- * searches through fstab when -a is passed
- * will try mounting stuff with all fses when passed -t auto
- *
- * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab.
- *
- * 1999-10-07 Erik Andersen <andersen@codepoet.org>.
- * Rewrite of a lot of code. Removed mtab usage (I plan on
- * putting it back as a compile-time option some time),
- * major adjustments to option parsing, and some serious
- * dieting all around.
- *
- * 1999-11-06 mtab support is back - andersee
- *
- * 2000-01-12 Ben Collins <bcollins@debian.org>, Borrowed utils-linux's
- * mount to add loop support.
- *
- * 2000-04-30 Dave Cinege <dcinege@psychosis.com>
- * Rewrote fstab while loop and lower mount section. Can now do
- * single mounts from fstab. Can override fstab options for single
- * mount. Common mount_one call for single mounts and 'all'. Fixed
- * mtab updating and stale entries. Removed 'remount' default.
- *
2005-08-10 20:35:54 +00:00
Paul Fox
0b62158475
implemented a builtin echo command in ash. moved the guts of the
...
echo applet into libbb, and now call bb_echo() from both echo.c
and ash.c
2005-08-09 19:38:05 +00:00
Paul Fox
156dc41cbc
commiting patch from bug 71:
...
0000071: patch: implement "--color" option for ls coloring control
2005-08-01 19:33:30 +00:00
Mike Frysinger
0d3ca7289e
tell people to ignore the dups/e0 warnings
2005-07-30 08:59:38 +00:00
Mike Frysinger
4d00896d05
use toplevel ARFLAGS and update default ARFLAGS to be quiet
2005-07-27 01:09:24 +00:00
Mike Frysinger
dbc049fda4
remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way
2005-07-26 22:57:51 +00:00
Mike Frysinger
726b2cb5da
just punt all the f_frsize crap since not all linux headers support it Bug 346
2005-07-26 22:39:56 +00:00
Paul Fox
4905434b8a
applying fix for:
...
0000265: tail -f should keep following files even if they
were truncated
2005-07-20 19:46:32 +00:00
Paul Fox
379ac89c30
applying patch from:
...
0000227: sort use wrong type for getopt return variable
2005-07-20 19:07:27 +00:00
Rob Landley
3c12ff7c89
If /tmp and /home were different partitions, then "mv /tmp/file /home/file"
...
would delete /home/file even if /tmp/file didn't exist.
This fixes that, although the logic of both mv and cp is a bit tangled and
should probably be untangled.
2005-07-20 00:45:40 +00:00
Mike Frysinger
8deb686d2e
Patch by jonlar in Bug 312 to split the U_W_TMP feature into sep UTMP and WTMP options
2005-07-01 01:04:32 +00:00
Mike Frysinger
a87bb60809
patch by Shaun Jackman to combine dup/close funcs into dup2
2005-06-30 03:43:14 +00:00
Mike Frysinger
8804c6a3b7
dont use f_frsize unless linux-2.6.0 or better
2005-06-29 01:07:04 +00:00
Mike Frysinger
9e164578f2
tweak signed/unsigned char usage to avoid mismatches
2005-06-24 21:37:59 +00:00
Rob Landley
f7662da2af
Shaun Jackman submitted a patch converting an allocation to use
...
CONFIG_RESERVE_BUFFER. (Rob Landley removed an #ifdef, per discussion on
the list.)
2005-05-28 23:55:26 +00:00
Rob Landley
47bc802e9e
Patch from Shaun Jackman to save a few bytes.
2005-05-28 23:36:38 +00:00
Mike Frysinger
1fb7961e08
use more busybox functions and remove redundant code
2005-05-16 22:35:59 +00:00
Mike Frysinger
1ece21bddd
as Rob Landley pointed out, need to fix the 1 versus i typo in indexing
2005-05-13 03:09:20 +00:00
Mike Frysinger
0fb397e617
blah, forgot to save last time to fix whitespacing
2005-05-13 00:58:18 +00:00
Mike Frysinger
867a6080fe
remove duplicated code and rework algorithms to end up with smaller code
2005-05-13 00:57:30 +00:00
Mike Frysinger
dad4cf7e63
use a bunch of if statements since it is a few bytes smaller than a switch; also use bb_xfopen() instead of fopen() so comm doesnt segfault when given non-existant files :(
2005-05-12 22:50:12 +00:00
Mike Frysinger
b3a6ec3e62
err, added 2 to the wrong var :) also touchup the option detection to shrink size
2005-05-12 22:41:13 +00:00
Mike Frysinger
3ba93c0438
fix segfault if user only specifies 1 file
2005-05-12 22:36:32 +00:00
Mike Frysinger
0d605e98b2
fix whitespace/coding style
2005-05-12 22:25:41 +00:00
Mike Frysinger
a84a512700
add missing comm.o rule
2005-05-12 22:23:15 +00:00