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
Mike Frysinger
5b300dd3a9
whitespace touchups
2005-05-12 22:22:50 +00:00
Rob Landley
2acfd7bd26
Small comm implementatin from Rob Sullivan. Needed to build perl.
2005-05-11 23:12:49 +00:00
Mike Frysinger
348e84c202
change the hardcoded error constant (0x80000000UL) to a nice flexible define (BB_GETOPT_ERROR)
2005-05-11 00:39:03 +00:00
Rob Landley
540d3f60f3
Patch from Shaun Jackman:
...
> This patch modfies expr to use portable POSIX regex rather than BSD
> regex.
...
> This updated patch implements an anchored regex by checking that the
> match starts at offset 0.
More to the point, this patch uses the same regex that sed.c is already using
(opportunity to suck in less library code), and even building a dynamically
linked busybox with just expr the result is a slightly smaller binary (by 94
bytes, I dunno what nm --size-sort has to say about it because I didn't build
with debug info, since that changes the binary size a lot by disabling
optimization...)
Your mileage may vary. Handle with caution. Do not taunt happy fun ball.
2005-05-09 21:42:42 +00:00
Rob Landley
b9dfb8c03f
Manuel points out that if printf needs a flush to act like dprintf, the result
...
is bigger. Revert last patch.
2005-05-07 17:45:38 +00:00
Rob Landley
cce1ae2ce5
Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf.
2005-05-07 07:53:16 +00:00
Rob Landley
60158cb93e
A patch from Takeharu KATO to update/fix SE-Linux support.
2005-05-03 06:25:50 +00:00
Rob Landley
6624daeb4d
On Wednesday 13 April 2005 09:12 pm, Shaun Jackman wrote:
...
> This patch fixes a memory leak in hash_file by using the BUFFER macros
> instead of xmalloc. Please apply.
2005-04-30 05:11:57 +00:00
Rob Landley
3071e2fda3
Patch from Matthew S. Wood:
...
> The following patch adds support for the -S and -b flags to `ln'. These
> flags [especially -b] are used extensively in Debian pre and post
> installation scripts.
Comments from Vladimir Oleynik influenced the final patch, and I also ripped
out the in-file changelog since it belongs here. At the time, it said:
/* Apr 15, 2004 Matthew S. Wood (mwood@realmsys.com )
*
* Implement '-b' (backup) flag.
* Implement '-S' (backup suffix) flag.
*
*
* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org )
*
* Fixed bug involving -n option. Essentially, -n was always in effect.
*/
2005-04-29 22:13:04 +00:00
Mike Frysinger
edb3fbc305
fix stupid build mistake i made earlier as pointed out by psm
2005-04-26 00:43:19 +00:00
Mike Frysinger
408ae211ce
rework human_fstype to cut down size
2005-04-24 04:11:44 +00:00
Mike Frysinger
f06c494636
rework options to get rid of extra variables
2005-04-24 03:53:12 +00:00
Mike Frysinger
9b5f71ec02
stat implementation based upon coreutils
2005-04-23 06:26:38 +00:00
Mike Frysinger
5b2e27137d
cast the time pointer so gcc stops warning over nothing
2005-04-23 01:42:03 +00:00
Mike Frysinger
5cfa5ef6f3
use bb_fflush_stdout_and_exit instead of exit
2005-04-23 01:41:51 +00:00
Mike Frysinger
4a2117027f
grab sum from coreutils, clean it up, and make it busybox happy
2005-04-21 23:24:46 +00:00
Mike Frysinger
6d1d2e59bf
add a printenv implementation
2005-04-21 23:23:13 +00:00
Mike Frysinger
c0bc9652fd
fix whitespace
2005-04-21 23:19:57 +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
4e5936ef95
In Bug 208, bernhardf writes:
...
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Mike Frysinger
2ed05ab146
fake out support for POSIX -H and -L options since busybox cp dereferences everything by default
2005-04-14 02:52:50 +00:00
Mike Frysinger
75ac42b1ae
add aliases == and [[ for = and [ to support more bash scripts
2005-04-14 02:49:22 +00:00
Manuel Novoa III
2c511609c4
Add 'nice' and replace 'renice' with a new implementation.
2005-02-13 20:14:05 +00:00
Rob Landley
c0dedd05e8
Sort rewrite to be SUSv3 compliant. New config option, updated help, and
...
a couple of infrastructure bits.
2005-01-24 07:00:02 +00:00
Mike Frysinger
6077d90c26
cp: make -P a synonym for -d
2005-01-07 00:56:47 +00:00
Eric Andersen
9315842242
Patch from David Daney:
...
It seems that date -s MMDDHHMMYYYY.ss
will ignore the .ss part. This patch tries to fix the problem.
David Daney.
2004-10-11 20:52:16 +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
Glenn L McGrath
f86391e7d7
Patch from William Barsse to fix a segfault when multiple files are specified.
2004-09-30 00:24:21 +00:00
Glenn L McGrath
afc9ab8686
Patch from David Daney to make the -i option work with -l.
2004-09-24 02:04:13 +00:00
Glenn L McGrath
ca1c1afadc
Add a missing brace, patch by Hideki IWAMOTO
2004-09-15 03:24:32 +00:00
Glenn L McGrath
f15dfc5570
Tito writes,
...
"This patch fixes all the bugs in id previously spotted by vodz and me.
The binary size increased a bit, but now it should work as expected."
2004-09-15 03:04:08 +00:00
Glenn L McGrath
240a91d8a1
Patch by Felipe Kellermann, use the common escape handling function and remove some unused code.
2004-09-15 02:05:23 +00:00
Eric Andersen
7eb79fff10
Tito writes:
...
Hi Erik,
Hi to all,
This is part five of the my_get*id story.
I've tweaked a bit this two functions to make them more flexible,
but this changes will not affect existing code.
Now they work so:
1) my_getpwuid( char *user, uid_t uid, int bufsize)
if bufsize is > 0 char *user cannot be set to NULL
on success username is written on static allocated buffer
on failure uid as string is written to buffer and NULL is returned
if bufsize is = 0 char *user can be set to NULL
on success username is returned
on failure NULL is returned
if bufsize is < 0 char *user can be set to NULL
on success username is returned
on failure an error message is printed and the program exits
2) 1) my_getgrgid( char *group, uid_t uid, int bufsize)
if bufsize is > 0 char *group cannot be set to NULL
on success groupname is written on static allocated buffer
on failure gid as string is written to buffer and NULL is returned
if bufsize is = 0 char *group can be set to NULL
on success groupname is returned
on failure NULL is returned
if bufsize is < 0 char *group can be set to nULL
on success groupname is returned
on failure an error message is printed and the program exits
This changes were needed mainly for my new id applet.
It is somewhat bigger then the previous but matches the behaviour of GNU id
and is capable to handle usernames of whatever length.
BTW: at a first look it seems to me that it will integrate well (with just a few changes)
with the pending patch in patches/id_groups_alias.patch.
The increase in size is balanced by the removal of my_getpwnamegid.c
from libbb as this was used only in previous id applet and by size optimizations
made possible in whoami.c and in passwd.c.
I know that we are in feature freeze but I think that i've tested it enough
(at least I hope so.......).
2004-09-02 22:21:41 +00:00
Eric Andersen
b225e2a76b
Fixup some warnings
2004-08-28 00:43:07 +00:00
Eric Andersen
095dd0c46d
Tito writes:
...
Hi,
I've fixed also the issue of whoami cutting down usernames.
This time I cannot send a diff because i don't know if my previous patches will be applied
or not, so I send in the whole file.
The changes I've made don't affect size but ensure that usernames of whatever lenght
are correctly displayed.
root@localhost:/dev/pts/3:/root/Desktop/busybox/coreutils# size whoami_orig.o
text data bss dec hex filename
102 0 0 102 66 whoami_orig.o
root@localhost:/dev/pts/3:/root/Desktop/busybox/coreutils# size whoami.o
text data bss dec hex filename
93 0 0 93 5d whoami.o
This should be applied even if the other patches aren't as this matches the behaviour of the GNU whoami.
Thanks in advance,
Ciao,
Tito
2004-08-26 22:36:02 +00:00
Eric Andersen
52499cb9ae
Tito writes:
...
Hi,
I've spent the half night staring at the devilish my_getpwuid and my_getgrgid functions
trying to find out a way to avoid actual and future potential buffer overflow problems
without breaking existing code.
Finally I've found a not intrusive way to do this that surely doesn't break existing code
and fixes a couple of problems too.
The attached patch:
1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows
2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h.
3) The behaviour of tar, ls and logger is unchanged.
4) The behavior of ps with somewhat longer usernames messing up output is fixed.
5) The only bigger change was the increasing of size of the buffers in id.c to avoid
false negatives (unknown user: xxxxxx) with usernames longer than 8 chars.
The value i used ( 32 chars ) was taken from the tar header ( see gname and uname).
Maybe this buffers can be reduced a bit ( to 16 or whatever ), this is up to you.
6) The increase of size of the binary is not so dramatic:
size busybox
text data bss dec hex filename
239568 2300 36816 278684 4409c busybox
size busybox_fixed
text data bss dec hex filename
239616 2300 36816 278732 440cc busybox
7) The behaviour of whoami changed:
actually it prints out an username cut down to the size of the buffer.
This could be fixed by increasing the size of the buffer as in id.c or
avoid the use of my_getpwuid and use getpwuid directly instead.
Maybe this colud be also remain unchanged......
Please apply if you think it is ok to do so.
The diff applies on today's cvs tarball (2004-08-25).
Thanks in advance,
Ciao,
Tito
2004-08-26 22:18:59 +00:00
Glenn L McGrath
73db8be80a
Patch from Bastian Blank to add 64 bit support to the test command.
...
Example of broken usage: ./busybox test 2147483648 -gt 2147483648
2004-08-11 02:45:47 +00:00
Eric Andersen
93d7fba892
Tito, farmatito at tiscali dot it writes:
...
Hi to all,
This patch is useful for:
1) remove an unused var from extern char *find_real_root_device_name(const char* name)
changing it to extern char *find_real_root_device_name(void).
2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and util-linux/umount.c accordingly.
3) fixes a bug, really a false positive, in find_real_root_device_name() that happens if
in the /dev directory exists a link named root (/dev/root) that should be skipped but
is not. This affects applets like df that display wrong results
2004-08-03 00:14:02 +00:00
Eric Andersen
aad29b37a7
Fixup getty, login, etc so the utmp and wtmp are updated, allowing
...
the 'who' and 'last' applets among other things to work as expected.
-Erik
2004-07-30 17:24:47 +00:00
Eric Andersen
4f807a84c5
BusyBox has no business hard coding the number of major and minor bits for a
...
dev_t. This is especially important now that the user space concept of a dev_t
and the kernel concept of a dev_t are divergant. The only bit of user space
allowed to know the number of major and minor bits is include/sys/sysmacros.h
(i.e. part of libc). When used with a current C library and a 2.6.x kernel,
this fix should allow BusyBox to support wide device major/minor numbers.
-Erik
2004-07-26 09:11:12 +00:00
Glenn L McGrath
efc6bf6365
Patch from Felipe Kellermann, fix endless loop when first > last and
...
increment > 0.
2004-07-23 06:43:29 +00:00
Glenn L McGrath
9c83e83628
Felipe Kellermann writes,
...
"As noticed today by Steven Scholz, the od's `-v' was broken.
I've fixed that and now both the flags `-v' and `-a' are OK"
Fixes a segfault in
echo "uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu\02bar\4"| ./busybox od -av
2004-07-23 01:42:28 +00:00
Manuel Novoa III
d709743b09
If read were to return with an error, bad things would happen. Fix it.
...
Also, make sure read errors are reflected in the applet exit code.
2004-05-26 15:21:19 +00:00
Eric Andersen
febd744d31
Use STDIN_FILENO rather than '0'
2004-05-26 10:26:10 +00:00
Eric Andersen
d4d01d2b9b
Rob Landley writes:
...
Run this test, against both busybox and a non-busybox version of "tee".
while true; do i=$[$i+1]; echo "hello $i"; sleep 1; done | ./busybox tee
Now run the busybox one again with the following small patch applied:
2004-05-26 09:54:36 +00:00
Eric Andersen
6c0396ba2a
Steve Grubb writes:
...
Hi,
I just re-reviewed the patch I just sent...and it needed to be BUFSIZ-3 in
dos2unix.c . tempFn is BUFSIZ so the last addressable spot it BUFSIZ-1. The loop
increments by 2. That's why it should be BUFSIZ-3.
Best Regards,
Steve Grubb
2004-05-05 19:39:21 +00:00
Eric Andersen
aaff79a8dd
Steve Grubb writes:
...
Hello,
I found and patched 2 more bugs. The first is a misplaced semi-colon. The second
one is a buffer overflow. I doubt the buffer overflow is triggered in real life.
But you never know what those wily hackers are up to.
Thanks,
Steve Grubb
2004-05-05 10:37:49 +00:00
Glenn L McGrath
c6992feee3
Update my email address, document some of my tasks in the AUTHORS file
2004-04-25 05:11:19 +00:00
Eric Andersen
7ff33f1b42
Thats odd. I guess this was cut-n-paste error, but vodz
...
email address was wrong!
2004-04-16 15:02:10 +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
39396b95fc
Fix non standard 'date -R' formatting
2004-04-06 09:38:18 +00:00
Eric Andersen
70060d25d2
s/fileno\(stdin\)/STDIN_FILENO/g
...
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Eric Andersen
97310d0253
Brian Pomerantz writes:
...
I've noticed a bug in the "autowidth" feature more, and is probably in
others. The call to the function get_terminal_width_height() passes
in a file descriptor but that file descriptor is never used, instead
the ioctl() is called with 0. In more_main() the call to
get_terminal_width_height() passes 0 as the file descriptor instead of
fileno(cin). This isn't a problem when you more a file (e.g. "more
/etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd |
more") the size of the terminal cannot be determined because file
descriptor 0 is not a terminal. The fix is simple, I've attached a
patch for more.c and get_terminal_width_height.c.
BAPper
2004-03-23 23:15:36 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
ed43806c3b
Hideki IWAMOTO writes:
...
Current `tr' implementation has a problem, if `plain char' is signed.
[current cvs version]
>echo a | _install/usr/bin/tr '\0' '\377'
Segmentation fault (core dumped)
[patched version]
>echo a | _install/usr/bin/tr '\0' '\377'
a
2004-03-12 22:10:40 +00:00
Glenn L McGrath
c66ebe4200
When displaying the size in 1kB blocks round up if an odd number of
...
blocks
2004-03-10 09:58:51 +00:00
Glenn L McGrath
44c0e17dbe
Patch by Seth W. Klein, the -l switch was reversed
2004-03-10 09:10:53 +00:00
Manuel Novoa III
1117c5281b
Fix broken sort order flags.
2004-03-08 10:54:29 +00:00
Eric Andersen
2479445562
Fix/eliminate use of atol
2004-03-06 22:11:45 +00:00
Glenn L McGrath
c4db0833a6
Patch from Matt Kraai to fix debian bug number 231994.
...
There was an extra blank line preceding the first directory.
2004-03-06 09:12:55 +00:00
Glenn L McGrath
95ed8d9f35
Close bracket in description from Peter Willis's eject applet
2004-03-05 06:47:25 +00:00
Glenn L McGrath
6db8c22d07
Return 1 upon failure
2004-02-22 02:58:57 +00:00
Glenn L McGrath
96099d51b6
Use return instead of exit, use == instead of & ==, left justify labels,
...
adjustment of whitespace.
2004-02-21 07:49:54 +00:00
Glenn L McGrath
01cdb66987
Add the -r option, patch from Rob with some help from myself.
2004-02-17 12:22:21 +00:00
Glenn L McGrath
c2266bd519
Woops, im getting ahead of myself, we dont have the -r (refernece)
...
option yet
2004-02-17 07:58:04 +00:00
Glenn L McGrath
5f11541bd4
define option names to be clearer, simplify nested if statements, remove
...
un-needed if statement, minor indenting change
2004-02-17 07:51:31 +00:00
Eric Andersen
d07cf59a98
Vladimir N. Oleynik writes:
...
Hi, Glenn.
Current CVS "ls" applet have small problem: some options
ignoring. Last patch attached ;-)
--w
vodz
2004-02-05 13:52:03 +00:00
Eric Andersen
c71c18957d
Jean Wolter writes:
...
Hello,
when calling seq with
seq 1 1
it generates an "endless" list of numbers until the counter wraps and
reaches 1 again. The follwoing small patch should introduce the
expected behavior (output of 1 and termination):
regards,
Jean
2004-02-04 11:01:19 +00:00
Manuel Novoa III
083862228a
Use bb_xstrdup() instead of strdup().
2004-02-01 07:34:28 +00:00
Eric Andersen
ab26cc3d8a
Avoid symbol naming conflict with libm
2004-01-30 22:24:32 +00:00
Glenn L McGrath
82364bb591
New applet, seq. No options, just the basics.
2004-01-27 09:22:20 +00:00
Glenn L McGrath
43112b4b65
Align using spaces to furthurest character and then one tab, now they
...
should always be aligned.
2004-01-27 07:36:07 +00:00
Eric Andersen
f2ec37902a
Pascal Brisset writes:
...
uuencode fails to encode binary data because it right-shifts
bytes as signed chars and keeps the duplicated sign bits.
The original base64_encode() from wget/http.c is broken as well,
but it is only used to encode ascii data.
-- Pascal
2004-01-26 07:17:30 +00:00
Manuel Novoa III
7018385fe7
Be stricter when converting strings to integers. Should fix the problem
...
reported by Rob.
2004-01-25 19:47:10 +00:00
Glenn L McGrath
4766a2d56c
Add the -r option as a synonym of -R
2004-01-25 05:50:28 +00:00
Glenn L McGrath
ca43b485de
Enable long options, adds 150 bytes.
2004-01-23 21:57:16 +00:00
Glenn L McGrath
654a99b691
Check valid options were given
2004-01-23 21:40:19 +00:00
Glenn L McGrath
711bb92d7c
Dont change ownership unless we created the directory.
2004-01-23 20:28:53 +00:00
Glenn L McGrath
578eff5066
Remove unneeded conditions and logic, fix bug where ownership didnt
...
change.
Dont use bb_make_directory it doesnt have the features, and its ugly to
work around it.
2004-01-23 10:57:00 +00:00
Glenn L McGrath
65b6d8bdb6
Fix a bug where ls -le
would print the time twice.
2004-01-18 05:41:30 +00:00
Glenn L McGrath
792cae5f2a
Use bb_getopt_ulflags, save 200-300 bytes
2004-01-18 05:15:16 +00:00
Glenn L McGrath
95f75a3dcd
Patch from Bastian Blank to fix debian bug #226722 , test case:
...
mkdir foo
touch foo/bar
ln -s bar foo/baz
2004-01-08 10:51:09 +00:00
Glenn L McGrath
cfc0ad4260
Batch from Bastian Blank to fix debian bug #216435 ;
...
When linking a non existing file busybox ln will report the target
missind and not the source:
2003-12-31 23:10:44 +00:00
Glenn L McGrath
5c0d84aaf0
Bring usage upto date, patch by Steven Scholz
2003-12-08 20:11:55 +00:00
Glenn L McGrath
11e69471be
Fix a bug, ignore the source path when installing to a directory.
...
We may be installing symlinks, so use lstat/lchown.
Make use of bb_getopt_ulflags and cp_mv_stat2, save 100 bytes.
2003-11-27 22:40:08 +00:00
Glenn L McGrath
7ffe133864
As we no longer use function pointers for read in common archiving code
...
archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
2003-11-21 22:24:57 +00:00
Glenn L McGrath
5c069aaf2f
Fix up the -s option, and make usage consitent with behaviour,
...
patch by Steven Scholz
2003-11-20 05:58:26 +00:00
Glenn L McGrath
931ae9d2f8
woops, we needed that function
2003-11-18 23:56:41 +00:00
Glenn L McGrath
de3ea9f049
Only use getopt and associated flags if checking is enabled
2003-11-18 19:35:06 +00:00
Glenn L McGrath
aee0fd8320
Replaced by md5_sha1_sum.c
2003-11-18 19:33:13 +00:00
Glenn L McGrath
303b7d83f0
Replaced by md5_sha1_sum.c
2003-11-18 18:56:25 +00:00
Glenn L McGrath
d2a897aab0
Merge common parts of sha1sum and md5sum, which is everything except the
...
algorithms.
Move algorithms to hash_fd and make them available via a common
function.
2003-11-10 04:33:55 +00:00
Eric Andersen
1b1942f93d
As vodz pointed out, setting unset_env to NULL is sufficient
2003-11-07 11:20:21 +00:00
Glenn L McGrath
7f9de02ca6
Rewrite, 800+ bytes smaller and more robust.
2003-11-06 03:17:23 +00:00
Eric Andersen
6d687817a8
Fix oversight with CONFIG_FEATURE_AUTOWIDTH handling
2003-11-04 23:16:48 +00:00
Eric Andersen
b7077a7316
Set unset_env pointing to a NULL item, to prevent us from walking
...
off the end of the list and segfaulting.
-Erik
2003-11-03 22:46:14 +00:00
Glenn L McGrath
4ef5a84583
Move the tail -c option from FANCY_TAIL to the default tail, this makes
...
the default tail options conform to SUSv3, with the non-SUS
option all in FANCY_TAIL
2003-10-31 00:35:59 +00:00
Glenn L McGrath
9716575f1a
Remove config options for sort -u and sort -r, they are always enabled
2003-10-31 00:04:24 +00:00
Glenn L McGrath
f4fd3a1331
Accept the -c option and do nothing
2003-10-29 11:10:02 +00:00
Eric Andersen
637d2266e1
Disable any buffering to stdout
2003-10-22 10:18:24 +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
a55d72bbb4
Patch from Steven Scholz, fix some warnings
2003-10-09 11:38:45 +00:00
Glenn L McGrath
a406a9c853
Add the -d option
2003-09-24 05:00:29 +00:00
Glenn L McGrath
eebcc1d98a
Add the "install" applet, move get_ug_id to libbb as its used by chown,
...
chgrp and install.
2003-09-24 03:22:57 +00:00
Eric Andersen
8efe967018
Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
...
to ensure proper fallback behavior on, i.e. serial consoles.
-Erik
2003-09-15 08:33:45 +00:00
Glenn L McGrath
07f6b95d8f
Patch from Jean Wolter
...
expr currently always adds even if told to subtract
2003-09-08 23:19:12 +00:00
Glenn L McGrath
55bf79f944
Preserve suid/sgid bits
2003-09-08 14:34:23 +00:00
Glenn L McGrath
dc4e75ef7c
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
...
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Glenn L McGrath
7b8765c808
vodz, last patch 103
2003-08-29 07:29:30 +00:00
Glenn L McGrath
c3f2956cfa
Woops, depend on SHA1 not the option
2003-08-26 04:28:05 +00:00
Glenn L McGrath
4d5e4685fe
SHA1 options depend on SHA1
2003-08-26 04:25:59 +00:00
Glenn L McGrath
d382c89467
Typo
2003-08-19 03:49:00 +00:00
Manuel Novoa III
5b3c05637d
Remove unnecessary pointer dereference.
2003-08-13 12:11:33 +00:00
Manuel Novoa III
96379b0d7d
Adjust Erik's change, as I don't claim copyright of the applet.
2003-08-09 02:57:55 +00:00
Eric Andersen
de6a6ae876
Remove unnecessary defamatory comment
2003-08-08 08:57:03 +00:00
Eric Andersen
6c0e0fb8ac
Fix a stupid bug I introduced several months ago
2003-08-08 07:39:57 +00:00
Eric Andersen
05df91a3ac
last_patch98 from vodz:
...
Denis,
># ./busybox env - echo zzz
>zzz
># ./busybox echo -n zzz
>zzz
># ./busybox env - echo -n zzz
>env: invalid option -- n
>
> obviously, env tried to understand -n as env's option
> instead of blindly passing it to echo...
>
>BusyBox v1.00-pre1 (2003.07.16-07:53+0000) multi-call binary
>
>Usage: env [-iu] [-] [name=value]... [command]
Ah, you found very old problem.
Last patch also have:
- multiple "-u unsetenv" support
- GNU long option support
- save errno after exec failed before bb_perror_msg()
--w
vodz
2003-07-28 07:42:19 +00:00
Eric Andersen
727f529211
There should be only one instance of CONFIG_FEATURE_AUTOWIDTH
2003-07-26 09:33:16 +00:00
Manuel Novoa III
b511f9cea9
Set the tm_isdst flag to -1 before calling mktime(). Otherwise, the current
...
timezone setting is used for the new date.
2003-07-23 23:24:31 +00:00
Eric Andersen
e5272074c9
eliminate DOSTATIC, DODEBUG, etc and name them sensibly
2003-07-22 22:15:21 +00:00
Eric Andersen
85e5e72bc1
Remove remaining libc5 support code
2003-07-22 08:56:55 +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
b7ebc61b54
Michael Sternberg writes:
...
Latest BusyBox from CVS (Jul 7 2003).
File coreutils/ls.c
"if" at line 970 should be enclosed in #ifdef CONFIG_FEATURE_LS_SORTFILES
"if" at line 976 should be enclosed in #ifdef CONFIG_FEATURE_LS_TIMESTAMPS
2003-07-14 19:20:46 +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
9e48045e45
Patch from Russell Coker:
...
I've attached my latest SE Linux patch for busybox against the latest CVS
version of busybox.
2003-07-03 10:07:04 +00:00
Eric Andersen
e5920a2dc0
Patch from Kent Robotti adding a bunch of menuconfig help
2003-07-03 10:00:15 +00:00
Eric Andersen
61f6db130e
As implemented, sha1sum would sometimes give the wrong answer.
...
This fixes it and uses faster sha1 code from Dr. Gladman.
-Erik
2003-07-03 09:41:41 +00:00
Eric Andersen
7c512439b2
Make sure we end up with a unix2dos link to busybox
2003-06-26 21:53:51 +00:00
Eric Andersen
9d7f0f0fe8
Somewhere in the 2.4.x kernel series, /proc/mounts was changed to display a
...
"rootfs" entry as well as the traditional "/dev/root" entry. This caused
applets such as mount and df to display two root filesystem entries....
This teaches the relevant utilities to ignore the "rootfs" entry.
-Erik
2003-06-20 09:36:49 +00:00
Eric Andersen
c9e7024924
Add prototype update missing from last_patch89. Fix screwy
...
formatting in cut.
2003-06-20 09:16:00 +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
6c43f743a3
sha1sum option to compare checksums
2003-06-08 13:32:12 +00:00
Glenn L McGrath
a721204ec5
Better error handling
2003-06-07 17:38:33 +00:00
Glenn L McGrath
a9e4617494
Minor correction
2003-06-07 17:11:00 +00:00
Glenn L McGrath
138d71bc35
Fix bug (wrong value computed) when reading file from stdin, implement
...
-s option
2003-06-07 17:06:28 +00:00
Glenn L McGrath
7aa62cf173
Run through indent
2003-06-07 14:54:24 +00:00
Eric Andersen
a2d1982841
cleanup a bit to remove needless verify() function
2003-05-26 18:09:14 +00:00
Glenn L McGrath
393183dccc
Vodz, last_patch_86
2003-05-26 14:07:50 +00:00
Glenn L McGrath
7a54360cd4
Use bb_xgetlarg
2003-04-27 10:05:35 +00:00
Glenn L McGrath
f01b805d91
New applet, fold
2003-04-27 06:02:14 +00:00
Eric Andersen
982da3e6b4
Add more help text
2003-04-04 15:20:53 +00:00
Eric Andersen
4762a48166
Test that cvs commit messages are working properly
...
-Erik
2003-04-04 14:35:36 +00:00
Manuel Novoa III
0c236a09ed
Fix 'thinko'.
2003-04-03 19:29:11 +00:00
Eric Andersen
b5b5ac3237
trivial fix to make sure we have sufficient arguments before
...
we mess with a possibly non-existant argv[1]
-Erik
2003-03-28 16:54:14 +00:00
Manuel Novoa III
3a9b0bf0ba
Oops... had != but meant ==.
2003-03-23 20:27:33 +00:00
Manuel Novoa III
ea4c43445c
Restrict octal perms to <= 07777. Cosmetic error message change.
2003-03-19 18:09:03 +00:00
Manuel Novoa III
4eff18189a
Things my compiler didn't catch...
2003-03-19 09:42:02 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Glenn L McGrath
008c01915b
Fix for big endian machines
2003-02-17 12:18:16 +00:00
Glenn L McGrath
ae0f1e7052
New applet sha1sum
2003-02-17 08:23:22 +00:00
Glenn L McGrath
3238ea1673
Merge fileutils, textutils and shellutils into coreuils
2003-02-15 10:53:40 +00:00
Glenn L McGrath
a88cb5025c
Patch from mathuria, compatability with solaris
2003-02-08 23:36:16 +00:00
Eric Andersen
fc4a0fd82e
last_patch75_2 from vodz,
2003-01-14 18:13:13 +00:00
Glenn L McGrath
4d00129d0f
Correct column width for tab completion and ls
2003-01-06 01:11:50 +00:00
Glenn L McGrath
76ff0da4d2
Support the obsolete '+' option
2002-12-23 11:54:56 +00:00
Eric Andersen
29f9b2fbdb
Add missing header file to squash a warning
2002-12-11 04:25:02 +00:00
Glenn L McGrath
7b4e89b9e3
Fix undefined behaviour and save some bytes as suggested by Manuel Novoa III
2002-12-10 03:16:37 +00:00
Glenn L McGrath
62fae308a3
Realpath applet
2002-12-10 00:14:33 +00:00
Eric Andersen
b077c9f47d
Fixup buffer allocation
2002-12-06 21:39:48 +00:00
Aaron Lehmann
a170e1c858
Change if(x)free(x); to free(x);
2002-11-28 11:27:31 +00:00
Glenn L McGrath
eaed78a91f
Style
2002-11-28 11:05:28 +00:00
Glenn L McGrath
cdf142af90
Woops, forgot they printout applet name as well....
2002-11-28 10:58:19 +00:00
Glenn L McGrath
d7d5f42934
Use error_msg instead of fprintf(stderr
2002-11-28 09:34:51 +00:00
Glenn L McGrath
8e027f6474
Use printf instead of fprintf(stdout
2002-11-28 08:37:46 +00:00
Glenn L McGrath
822e7fd587
When making parent directories set permissions based on the base parent tree rather than the new directory to be created.
2002-11-24 22:48:20 +00:00
Glenn L McGrath
e16860df08
Will the real od.c please stand up! (my previous commit was a mistake)
2002-11-10 22:16:09 +00:00
Glenn L McGrath
59870e89ae
Prevent a segfault if no argument, by Geoffrey Lee <glee@bluesat.unsw.edu.au>
2002-11-10 21:52:59 +00:00
Eric Andersen
d274b53c1d
last_patch59 from vodz to cleanup chmod and correctly parse '-rwxgoa'
2002-10-10 03:47:01 +00:00
Eric Andersen
02e6ba91e8
Vodz' last_patch57:
...
Hi, Erik.
my_getpw(uid/gid) and applets used it have problem:
if username for uid not found, applets can`t detect it
(but code pessent). Also "%8ld " format is bad:
spaces not required (applets have self format
or spec format (tar applet) and overflow for "id" applet...)
This problem also pressent in stable version.
Patch for unstable in attach.
--w
vodz
2002-09-30 20:39:56 +00:00
Glenn L McGrath
924f93e848
make_directory() will fail instantly so we dont need to test for failure here
2002-09-28 08:32:14 +00:00
Eric Andersen
60943c5d5c
Sane-ify the screen clearing stuff.
...
-Erik
2002-09-17 20:53:41 +00:00
Glenn L McGrath
18b76e6f80
Watch applet by Michael Habermann
2002-09-16 09:10:04 +00:00
Aaron Lehmann
5d3cb7cc1f
move some globals to bss
2002-08-23 07:28:45 +00:00
Glenn L McGrath
acfc0d872e
Run through indent, fix comments
2002-08-23 06:05:11 +00:00
Glenn L McGrath
03195fc16f
Run through indent, fix comments
2002-08-23 05:58:38 +00:00
Glenn L McGrath
a199b17253
Run through indent, specify cast
2002-08-23 03:37:07 +00:00
Glenn L McGrath
14dad7028b
Run through indent
2002-08-23 03:25:22 +00:00
Glenn L McGrath
e3906fcd94
Run through indent, fix BB_ define
2002-08-22 18:13:54 +00:00
Robert Griebl
6859d761d3
- updated a few copyright/left file headers
...
- documented most of my 0.61 changes in the ChangeLog
2002-08-05 02:57:12 +00:00
Robert Griebl
df03932b7e
Added the -I (isofmt) options to date, which comes in handy for scripts
...
(this is a confiureable option)
2002-07-30 23:11:00 +00:00
Robert Griebl
d378c3149c
Applied vodz' patches #49 and #50 (with a small correction in runshell.c)
...
#49 : I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50 : I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
2002-07-19 00:05:54 +00:00
Eric Andersen
2276d83639
Fixup warnings and undefined operations that show up in gcc-3.1
...
-Erik
2002-07-11 11:11:56 +00:00
Eric Andersen
887ca79f04
Scrub pwd.h and grp.h handling so we don't have to play any
...
silly games.
-Erik
2002-07-03 23:19:26 +00:00
Eric Andersen
009ae1f17d
Little fix to avoid overflow
2002-07-03 04:24:08 +00:00
Aaron Lehmann
69d4178708
Remove advertising clauses in accordance with
...
ftp://ftp.cs.berkeley.edu/ucb/4bsd/README.Impt.License.Change
2002-06-23 22:25:24 +00:00
Eric Andersen
b0fd2b06a3
Fix a potential macro expansion problem... isspace can be
...
a macro causing a double decrement...
2002-06-15 14:37:46 +00:00
Eric Andersen
a7d0b41c08
Don't use pointless GNU-isms
2002-06-15 14:33:06 +00:00
Eric Andersen
fc059090b6
last_patch41 from vodz to fix stty -F and similar
2002-06-06 11:35:29 +00:00
Manuel Novoa III
b99cb64b80
Include busybox.h before testing CONFIG_LOCALE_SUPPORT.
2002-05-29 19:08:41 +00:00
Robert Griebl
53146cc9ec
Added include for isdigit(); simplified -<num> detection
2002-05-27 22:24:53 +00:00
Robert Griebl
13c26fc1a5
SUpport old style -[::digit::] options for head and tail
...
Also make head behave like GNU head (-0/-n 0 is valid)
2002-05-17 22:18:04 +00:00
Tim Riker
95bf6da637
fix and shrink uuencode
2002-05-01 05:57:16 +00:00
Eric Andersen
d598d41110
Fix silly combinitorial oversight
2002-04-27 09:19:39 +00:00
Eric Andersen
ef38b39262
Support noerror option
2002-04-27 01:31:43 +00:00
Eric Andersen
00a6a75035
Add the who applet, supplied by Da Chen <dchen@ayrnetworks.com>
2002-04-26 23:53:10 +00:00
Eric Andersen
5f6873621d
ls could mis-color certain entries when previous commands
...
had failed. Explicitly 0 out errno to prevent that.
2002-04-17 20:21:45 +00:00
Eric Andersen
1d1d2f9b18
Update some missing copyright notices
2002-04-13 08:31:59 +00:00
Eric Andersen
265d229427
Patch from Edward Betts <edward@debian.org> to add -x switch to du.c
2002-04-06 23:16:44 +00:00
Eric Andersen
fcffa2cc1a
Apply lash_patch35 from vodz, which brings several nice size_optimizations.
2002-04-06 05:17:57 +00:00
Manuel Novoa III
fa15f702d2
Work around compiler/assembler problem and reduce code size at the same time.
2002-03-25 02:37:20 +00:00
Eric Andersen
27eff033d2
Eliminate extra trailing space
2002-03-20 16:10:54 +00:00
Eric Andersen
3ad0bd9563
Patch from J.W.Janssen <JanWillem.Janssen@lxtreme.nl> to provide
...
color ls support, modifed by me to behave properly when not running
output to a terminal (i.e. 'ls | more')
-Erik
2002-03-20 09:13:48 +00:00
Matt Kraai
a1bbde71bf
list_single: Declare scratch iff CONFIG_FEATURE_LS_USERNAME is defined.
2002-03-08 16:25:33 +00:00
Matt Kraai
3bd31ebc9a
* fileutils/ls.c (showfiles): Display multiple short names on a line.
2002-03-08 16:16:38 +00:00
Matt Kraai
eb83478528
* fileutils/dd.c (dd_main): Ignore ftruncate error if the output is not a
...
file or directory.
2002-02-05 15:28:54 +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
38c15becf6
Avoid printing a trailing blank character.
2001-12-20 21:11:59 +00:00
Matt Kraai
ace02dc9cd
Make cp and mv optionally preserve hard links.
2001-12-17 15:26:36 +00:00
Matt Kraai
741f40b58e
Use an int to hold the result of fgetc (bug noted by David Kimdon).
2001-12-11 16:06:02 +00:00
Matt Kraai
dba11452cb
Continue processing files if we are asked to touch, but not create, a file
...
which doesn't exist.
2001-12-07 21:27:38 +00:00
Matt Kraai
3eeab3b23f
Update copyright and close file descriptors (noted by Axel Kittenberger).
2001-12-07 16:27:37 +00:00
Eric Andersen
c98c06233e
Merge in the cal applet from Steve Merrifield <steve@labyrinth.net.au>
2001-12-06 15:16:43 +00:00
Manuel Novoa III
6509f92a3b
Combined size reduction changes by Glenn and myself. Added back in "unknown"
...
for -p to match normal uname behavior (at a cost of 30-40 bytes).
2001-12-05 04:21:30 +00:00
Glenn L McGrath
9e6c9f7311
Minor space saving improvments
2001-11-21 12:46:36 +00:00
Glenn L McGrath
74afa9aed1
When just counting chars of a file stat file instead of reading the whole file (Fixes Debian bug #103302 )
2001-11-21 10:26:28 +00:00
Glenn L McGrath
c29ab97094
woops. dotn pass NULL
2001-11-21 10:01:29 +00:00
Glenn L McGrath
1477ad8e83
Simplify print function, prints an extra space if no filename, but saves 4 bytes
2001-11-21 09:58:29 +00:00
Glenn L McGrath
02d090d3d2
Use enums for selected functionality, Reduce the size by nearly 100 Bytes
2001-11-21 09:17:00 +00:00
Eric Andersen
26f8e95d2d
David Kimdon <dwhedon@instant802.com> noticed a thinko
...
in md5sum where only binary sums were verified. He also
sent in this patch,
-Erik
2001-11-17 04:16:15 +00:00
Glenn L McGrath
60281118d0
Introduce od and hexdump applets
2001-11-02 11:39:46 +00:00
Eric Andersen
eaecbf33f7
Fixup some silly prototype warnings
2001-10-31 10:41:31 +00:00
Matt Kraai
258bd3d971
Split true and false into separate applets.
2001-10-24 19:00:20 +00:00
Eric Andersen
1a10eec178
Fixup the location of pwd.h and grp.h
2001-10-24 17:19:38 +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
Glenn L McGrath
1d098cefe2
Use wfopen instead of fopen & error_msg, saves 64 bytes
2001-10-05 05:24:19 +00:00
Matt Kraai
4c557bf576
Invert FILEUTILS_PRESERVE_SYMLINKS into FILEUTILS_DEREFERENCE.
2001-10-05 01:35:10 +00:00
Matt Kraai
1350666498
Add -p support.
2001-08-29 21:18:47 +00:00
Matt Kraai
5171bf6d40
SUSv2 specifies that if the extension is identical to the basename, it
...
should not be removed.
2001-08-29 20:19:29 +00:00
Eric Andersen
59443965ad
Scrub things and ditch uint64_t and use a custom type name
...
to avoid C lib compatibility problems.
2001-08-22 05:06:29 +00:00
Eric Andersen
c61804ed59
Fix dos2unix compile problem with certain glibc versions
2001-08-21 22:34:05 +00:00
Matt Kraai
d0b5be6da8
Remove BB_SH define entirely.
2001-08-09 21:00:15 +00:00
Matt Kraai
2338d3176b
Use ferror(3) to check for errors, rather than inspecting errno. Thanks to
...
David Douthitt for reporting, and shame on me for writing such crappy code.
2001-08-06 16:09:09 +00:00
Eric Andersen
0b7d70c822
Fix up some silly messups with the debian packaging, and a dumb
...
bug with chroot. I've had the package uploaded but perms set to
000, so I am going to re-tag things and re-cut the release. Folks
who pulled from CVS in the last 30 minutes with just have to cope.
-Erik
2001-08-02 20:56:16 +00:00
Eric Andersen
be0c36009a
More libc5 fixups
...
-Erik
2001-08-02 10:55:32 +00:00
Eric Andersen
3450636169
Latest patch from vodz. Adds a check for divide by zero in the posix
...
math suport, cleaner math syntax error checking, moves redundant signal
string tables (from kill and ash) into libbb and provides a few
cleanups elsewhere.
2001-08-02 05:02:46 +00:00
Eric Andersen
bb9579ffc3
Make formatting match GNU ls (we were including a spare ' ')
...
-Erik
2001-07-31 22:43:50 +00:00
Matt Kraai
73f6a1b058
Always write record counts to stderr.
2001-07-31 21:02:19 +00:00
Glenn L McGrath
b6071b6341
Fix permisions when reading from stdin
2001-07-29 06:04:26 +00:00
Glenn L McGrath
eba260587a
Fix broken logic when wraping encoded data into rows, also simplifies it a bit
2001-07-29 05:47:33 +00:00
Glenn L McGrath
4e664ac51d
The src buffer size has to be a multiple of 3 (as i noted, but didnt do).
2001-07-28 21:34:25 +00:00
Glenn L McGrath
089decab65
Rewrite based on wget uuencode function.
...
Saves aprox. 200 Bytes and in future can use common code between
this and wget if BB_FEATURE_WGET_AUTHENTICATION is defined.
2001-07-28 21:06:13 +00:00
Eric Andersen
655584b07a
This fixes dos2unix and unix2dos so they behave as expected. dos2unix
...
was broken in the 0.52 release, and unix2dos was pretty lame...
-Erik
2001-07-25 07:22:55 +00:00
Eric Andersen
8d79ce8320
Some patches to make dietlibc work...
2001-07-22 23:00:15 +00:00
Eric Andersen
20aab260e2
Some adjustments, mostly from David McCullough <davidm@lineo.com> to
...
make busybox be more uClinux friendly. I also adjusted Config.h for
uClinux so it will automagically disable apps the arn't going to
work without fork() and such.
-Erik
2001-07-19 22:28:02 +00:00
Eric Andersen
7467c8d3b6
Patch from vodz:
...
Changed email address
cmdedit API change
optimizations for traceroute and md5sum
added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Eric Andersen
55522080c6
Patch for md5sum from Aaron Lehmann <aaronl@vitelus.com> to slim
...
it down a little bit.
2001-07-10 16:31:29 +00:00
Eric Andersen
91b84603d3
Cleanup from vodz
2001-07-10 16:25:34 +00:00
Eric Andersen
5a4a46a251
Patch from vodz to support 'tr a-z A-Z' syntax.
2001-07-09 21:32:29 +00:00
Eric Andersen
22ecf049b6
Per patch from vodz, change a couple of consts to defines, since
...
apparently gcc 2.95.4, at least, is too stupid to realize that a
"static const int" is in fact a constant.
2001-07-02 17:32:40 +00:00
Eric Andersen
7e516797f9
Pad the human readable output for 'ls -sh' to 6 chars, since we will
...
have numbers printed as XXX.YU, so we need 6 digits not 4.
-Erik
2001-06-30 18:00:26 +00:00
Eric Andersen
8fa1bf7cd6
Fix a silly logic error which caused symlinks to be printed twice, and
...
wrongly caused the return code to be an error.
-Erik
2001-06-30 17:54:20 +00:00
Manuel Novoa III
8f01839386
Fixed scaling problems involving make_human_readable_str.
2001-06-30 07:48:01 +00:00
Manuel Novoa III
a77cfbfd0c
ls -s was reporting bytes instead of blocks.
2001-06-30 07:46:50 +00:00
Eric Andersen
db15cb72e2
A really nice patch from Manuel Novoa III for compile time
...
configurable size/speed tradeoffs.
2001-06-29 20:44:51 +00:00
Manuel Novoa III
a2949aa217
Add some missing includes to kill warnings when building with the default
...
Config.h and using gcc's -fno-builtin. There are probably other files
with the similar problems.
Also, if building against uClibc, don't include asm/unistd.h in syscalls.c
and module_syscalls.c.
2001-06-29 18:59:32 +00:00
Eric Andersen
ce98c19dfe
A patch from Erik Meusel <erik@wh58-709.st.uni-magdeburg.de>
...
to fix the behavior of 'tail -f -n 0 FILE'
2001-06-26 15:07:08 +00:00
Eric Andersen
24982c589b
Fix up some warnings that show up on ppc
2001-06-25 19:31:48 +00:00
Eric Andersen
e0c0757d09
These were broken when using dmalloc due to include file ordering
...
problems. busybox.h must be last.
-Erik
2001-06-23 13:49:14 +00:00
Matt Kraai
ceeff73819
Rewrote mkdir (and touched lots of things in the process).
2001-06-21 19:41:37 +00:00
Eric Andersen
f429baca86
I reworked make_human_readable_str so it now has a sane interface,
...
and then fixed up df, du, and ls to use the new interface. I also
fixed up some formatting issues in ls while I was in there.
-Erik
2001-06-13 08:02:45 +00:00
Eric Andersen
8b113f93b9
Vladimir's last_patch13, containing several bugfixes.
2001-06-01 21:47:15 +00:00
Mark Whitley
8b7a0d807a
Some more patchelttes from Larry Doolittle.
2001-05-24 21:31:09 +00:00
Eric Andersen
5a9d441b2c
Fix up some signed char vs int issues that show up on powerpc.
2001-05-24 14:16:28 +00:00
Eric Andersen
77d9268892
Patch from larry to fix some grammar errors.
2001-05-23 20:32:09 +00:00
Eric Andersen
004015e9c4
Patch from Lars Kellogg-Stedman <lars@larsshack.org> to fix bug
...
#1130 (i.e. When you turn on features it should always ADD features)
2001-05-21 20:30:51 +00:00
Mark Whitley
b6967635eb
(Almost) brand-new version of cut that supports muitiple lists of positions,
...
per feature request from Tom Oehser.
2001-05-18 23:04:51 +00:00
Matt Kraai
6943815400
Fix applet_name.
2001-05-17 20:40:21 +00:00
Matt Kraai
bc0f783a5f
Fix invocation of builtin shell to have proper argc and argv.
2001-05-17 03:54:37 +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
Eric Andersen
c911a4389b
Patch from Vladimir:
...
1) fixed a bug that could crash df, mount, and umount applets if the root
device name was longer then the word "root" (/dev/loop1 vs /dev/root) -
2) severl functions needed static declaration in the umount applet
3) update declaration for function in last_char_is() in libbb
2001-05-15 17:42:16 +00:00
Eric Andersen
2b02ab9606
This patch from Lars Kellogg-Stedman, fixes the behavior of
...
chown to be consistant with GNU chown, so that it follows
symlinks (who cares about the perms on a link anyways?) unless
the -h option is supplied.
-Erik
2001-05-11 15:55:41 +00:00
Matt Kraai
eb5f433736
Check that putenv succeeded, suggested by Jonas Holmberg.
2001-05-11 15:16:28 +00:00
Matt Kraai
5b44f48afc
Fix handling of '-' option and way that variables are added to the
...
environment from Jonas Holmberg <jonas.holmberg@axis.com>. Fix
handling of command options by adding + to getopt string.
2001-05-11 14:26:29 +00:00
Eric Andersen
de0ca0cd9e
Silence cut so it doesn't whine during compilation
2001-05-07 23:07:17 +00:00
Eric Andersen
04b0354d8e
Patch from Vladimir to use last_char_is to simplify du.c
2001-05-07 22:49:43 +00:00
Eric Andersen
8f3e51b4ad
Patch from Vladimir to remove testing stuff from stty
2001-05-07 22:47:45 +00:00
Matt Kraai
2e6c878763
Rewrite -c and -b processing to shrink code and eliminate buffer overrun.
2001-05-05 16:19:13 +00:00
Matt Kraai
6689140597
Remove summary header. Not present in GNU or SUSv2.
2001-05-03 04:45:40 +00:00
Mark Whitley
8a633268ef
Made new xreadlink function for libbb and changed applets to use it instead of
...
readlink(2).
2001-04-30 18:17:00 +00:00
Eric Andersen
65504ac12c
These do not need initial values. Let them live in the bss.
...
-Erik
2001-04-30 18:07:24 +00:00
Matt Kraai
6aabfd5e30
Fix handling of permission addition and removal (e.g., o-r).
2001-04-26 18:55:29 +00:00
Eric Andersen
ca85cdbe4c
Doh. I never allocated storate for the struct stat I am using.
...
There was just a never initialized pointer.
-Erik
2001-04-26 18:43:36 +00:00
Matt Kraai
468f504fd7
Fix handling of -R flag.
2001-04-26 18:27:47 +00:00
Eric Andersen
c1bdffe99b
Another nice cleanup from Larry. This adds a new last_char_is() function and
...
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the
possible space-hogging inline of strlen() in several cases.
-Erik
2001-04-26 15:56:47 +00:00
Eric Andersen
3c3277f0bd
As Larry pointed out, this the off by one canbe fixed much more elegantly.
2001-04-26 15:41:51 +00:00
Eric Andersen
30592a5451
Fix a silly off-by-one error noticed by Santiago Garcia Mantinan <manty@debian.org>
...
-Erik
2001-04-26 14:56:45 +00:00
Mark Whitley
207587a9b4
Applied patch from I.Q. to add -s to cmp.
2001-04-25 20:41:02 +00:00
Eric Andersen
c57a75d896
Larry noticed that chown and chgrp has the version numbers off a bit
...
for glibc's lchown support. Thanks Larry.
2001-04-25 17:12:33 +00:00
Eric Andersen
04095e58fb
Move messages.c to libbb. Make each string in messages.c be its own .o file.
...
This way, we can new get rid of all that tedious #define rubbish we used to
need to enable specific messages. This way is enormously simpler, and as a
bonus also ends up saving us 96 bytes.
-Erik
2001-04-25 05:39:18 +00:00
Matt Kraai
8810bdbba3
Rewrote rm.
2001-04-24 20:04:18 +00:00
Eric Andersen
9f0fedb8f6
Split up chmod_chown_chgrp.c into 3 separate apps. This unfortunately
...
adds 384 bytes to the overall size. But having each app be standalone
is the Right Thing(tm) so we will just have to live with it.
-Erik
2001-04-24 18:07:19 +00:00
Matt Kraai
01441036e9
Use generic flag names.
2001-04-24 01:30:02 +00:00
Matt Kraai
91b2855ba8
Rewrite cp and mv to be SUSv2 compliant.
2001-04-23 18:53:07 +00:00
Matt Kraai
782ab3ccf8
Simplify pathname building, in which a bug was noted by Larry Doolittle,
...
a patch was provided by Vladimir Oleynik, and am improved patch commited
by me.
2001-04-23 01:07:00 +00:00
Matt Kraai
3ce79338e6
Fix buffer underrun noted and solved by Larry Doolittle.
2001-04-19 14:56:23 +00:00
Mark Whitley
fccaa3629b
Applied patch from I.Q. to add sort -u as a feature.
2001-04-17 18:56:18 +00:00
Mark Whitley
6e808ca354
Changed line[strlen(line) - 1] = '\0'; to chomp(line);
2001-04-17 18:26:11 +00:00
Mark Whitley
3828dbed57
Applied patch from I.Q. to fix problem with sort -n.
2001-04-17 17:47:33 +00:00
Eric Andersen
4a2e463525
Handle endian-ness. Patch from Paul J.Y. Lahaie <pjlahaie@linuxcare.com>
...
-Erik
2001-04-14 03:33:33 +00:00
Matt Kraai
1e04ea388f
Fix dos2unix/tr problem noted by Larry Doolittle.
2001-04-12 21:38:06 +00:00
Glenn L McGrath
a6ce670a87
use tmpfile() and revert my previous changes... convert() belongs here
2001-04-12 02:26:04 +00:00
Glenn L McGrath
50b787cac5
Move convert to libbb
2001-04-12 00:52:29 +00:00
Glenn L McGrath
ed897e5415
Vladimir's patch to reverse previous patch
2001-04-11 17:20:44 +00:00
Eric Andersen
e5dfced23a
Apply Vladimir's latest cleanup patch.
...
-Erik
2001-04-09 22:48:12 +00:00
Eric Andersen
250a221768
more FILE_OFFSET_BITS == 64 adjustments.
2001-04-05 23:26:44 +00:00
Eric Andersen
e76c3b08e1
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
...
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can
handle them sanely and all at once.
-Erik
2001-04-05 03:14:39 +00:00
Eric Andersen
91c9388715
Place a temporary bandaid on the ls/du/df human-readable issue. This method is
...
not going to scale up as well as I would like, and Matt Kraai and I have
discussed a better long term solution. But for now this will at least make all
the human-readable apps give correct answers.
Please test the human readable/non-human readable options on your systems!!!
-Erik
2001-04-03 23:14:29 +00:00
Eric Andersen
84e229cfbe
Add in a new standalone env applet for fixing up app's environments
...
-Erik
2001-03-29 22:48:33 +00:00
Eric Andersen
c835567914
Fix ls so it uses make_human_readable_str() the same way already
...
used by 'du' and 'df'. Now we just need to fix make_human_readable_str
so it behaves they way it used to before Matt fixed it.
2001-03-28 20:26:51 +00:00
Mark Whitley
9a2144663a
Applied patch from David Douthitt to fix problem where ls reports half the
...
file size. Should close bug #1140 .
2001-03-27 20:59:14 +00:00
Eric Andersen
f6aa13d403
-Wshadow tr fix from Jeff Garzik
2001-03-23 17:08:21 +00:00
Eric Andersen
1ca20a7747
A nice patch from Larry Doolittle that adds -Wshadow and
...
cleans up most of the now-revealed problems.
2001-03-21 07:34:27 +00:00
Eric Andersen
92d23245c9
Another cleanup patch from Jeff Garzik <jgarzik@mandrakesoft.com>
2001-03-19 23:49:41 +00:00
Eric Andersen
8269396491
Simpify detection of no options.
2001-03-19 19:40:43 +00:00
Eric Andersen
7ef54de672
locale correction patch from Vladimir
2001-03-19 19:25:49 +00:00
Eric Andersen
cc165b9083
Should exclude "i" option when not enabled.
2001-03-19 18:59:01 +00:00
Eric Andersen
00b0496e69
Doesn't need a "-" option -- getopt does that for us.
2001-03-19 18:57:08 +00:00
Eric Andersen
16f7015722
Patch from Vladimir to force interactiveFlag=FALSE when forceFlag=TRUE
2001-03-19 18:54:38 +00:00
Eric Andersen
7c25441792
getopt-ify rm so that BB_FEATURE_RM_INTERACTIVE will work
2001-03-19 18:52:37 +00:00
Mark Whitley
f6ba2da29f
Credited Christophe Boyaniqu for interactive patch to rm.
2001-03-13 16:35:55 +00:00
Mark Whitley
e0bf91d7c6
Applied patch from Christophe Boyanique to add -i support to rm.
2001-03-13 00:40:19 +00:00
Mark Whitley
09f4af5afd
/* getopt not needed */
2001-03-10 00:13:20 +00:00
Mark Whitley
827e45c518
Added some more '/* getopt not needed */' lines.
2001-03-09 23:59:51 +00:00
Eric Andersen
d92168486b
Fixed df.c so that nfs volumes will display properly (fixing bug #1113 ).
...
Problem was 512/1024 = 0 if you use longs, so I cast KILOBYTE to a double, then
cast the result back to an int after the math is done, letting C's type
promotion do its magic for the rest.
-Erik
2001-03-09 22:42:26 +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
3e6ff9017f
A cleanup patch from Jeff Garzik to static-ify a number of
...
namespace polluting things that really should be static.
2001-03-09 21:24:12 +00:00
Eric Andersen
eba8ed71f0
Patchs from Jeff Garzik <jgarzik@mandrakesoft.com> to cleanup
...
warnings with glibc 2.2 and use always use xfopen
-Erik
2001-03-09 14:36:42 +00:00
Matt Kraai
5de909873a
Eliminate superfluous test.
2001-03-07 21:45:13 +00:00
Mark Whitley
ae5612ca6e
Some minor cleanups to df.c. Also, with Erik's blessing, changed name of
...
'format' function to 'make_human_readable_str'.
2001-03-07 17:42:07 +00:00
Eric Andersen
ec9fad9a49
Static-ify a variable. make du work with all the human-readable variants
...
since my last pass only fixed 'du -h' but left the others broken.
2001-03-07 06:04:08 +00:00
Eric Andersen
a7db19bb81
Fix up du so it behaves itself also.
...
-Erik
2001-03-07 03:53:40 +00:00
Eric Andersen
5986f8d1c6
Fix up df so it works properly
...
-Erik
2001-03-07 03:50:03 +00:00
Eric Andersen
651f8c04ef
Fix up ls.c to ensure human readable works properly in all cases
2001-03-07 03:48:02 +00:00
Eric Andersen
8b728a25a3
I made these little simplifications a while back, bug forgot to
...
check this stuff in.
-Erik
2001-03-06 23:14:43 +00:00
Mark Whitley
446dd27843
Applied patch from Vladimir N. Oleynik that fixes incorrect behaviour in
...
recovery_mode and changed option processing.
2001-03-02 20:00:54 +00:00
Eric Andersen
4142d4dc66
Patch from Vladimir N. Oleynik to save 128 bytes by moving error
...
checking for some my_* functions to utility.c
2001-02-27 18:22:03 +00:00
Eric Andersen
544891dd26
Add in kent robotti's updated dos2unix.c
2001-02-22 23:37:30 +00:00
Eric Andersen
7aa1f5c42a
Make md5sum not display filename when reading stdin
...
-Erik
2001-02-22 04:59:16 +00:00
Eric Andersen
54006bce25
Oops! I left in my debug noise.
2001-02-21 00:27:22 +00:00
Eric Andersen
7c3e7ac940
df was totally broken. So I fixed it.
...
-Erik
2001-02-21 00:24:51 +00:00
Mark Whitley
8d7bdc9deb
Small patch from Kent Robotti to show megabytes in human-readable output.
2001-02-20 21:57:55 +00:00
Eric Andersen
9e37007edb
Minor cleanup.
2001-02-20 21:52:49 +00:00
Eric Andersen
f1142c5b11
Oops. Put time.h after busybox.h, so we can check for BB_FEATURE_LS_TIMESTAMPS
...
-Erik
2001-02-20 06:16:29 +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
Eric Andersen
963791a9e9
Another patch from Vladimir to eliminate obsolete junk.
2001-02-18 20:13:18 +00:00
Eric Andersen
b50da53e0c
Get rid of long stale usage message code.
...
-Erik
2001-02-17 16:52:35 +00:00
Glenn L McGrath
a9c69762ba
Fix compile error, sync() always returns 0 anyway.
2001-02-16 10:21:35 +00:00
Eric Andersen
d69d2da165
use perror_msg instead of perror to print the applet name.
...
-Erik
2001-02-15 20:12:05 +00:00
Eric Andersen
81bcc92c32
Fixed 'ls -s' so it actually displays block sizes again.
...
-Erik
2001-02-15 18:59:02 +00:00
Eric Andersen
67991cf824
This patch, put together by Manuel Novoa III, is a merge of work
...
done by Evin Robertson (bug#1105) and work from Manuel to make
usage messages occupy less space and simplify how usage messages
are displayed.
2001-02-14 21:23:06 +00:00
Eric Andersen
98e599ca06
Commit Vladimir's latest version of stty.c. Nice work.
...
-Erik
2001-02-14 18:47:33 +00:00
Matt Kraai
a164c647ac
Make suffix_mult structures const. Thanks to Vladimir N. Oleynik.
2001-02-05 17:50:03 +00:00
Mark Whitley
9b300d0b1f
Buglet: 'tabstops' is unused if BB_FEATURE_AUTOWIDTH is not defined.
2001-02-01 19:39:43 +00:00
Matt Kraai
dd19c69904
Removed trailing \n from error_msg{,_and_die} messages.
2001-01-31 19:00:21 +00:00
Eric Andersen
65225df2dc
Cleanup patch from Vladimir N. Oleynik.
...
* mkdir: remove 3 lines in source code.
* mkfs_minix: save 32 bytes, remove 4 bugs.
* mkswap: save 64 bytes, remove 1 bug.
2001-01-31 17:35:02 +00:00
Eric Andersen
30f64c3aa2
Fix a stupid typo -- bug found by Larry Doolittle.
2001-01-30 19:23:46 +00:00
Eric Andersen
e57d54b456
Fix ls behavior for broken or very narrow terminals. Fix my_*
...
functions so they comply with the original interface (i.e. don't
exit on error, stringify uids and gids when no amtching name found).
-Erik
2001-01-30 18:03:11 +00:00
Matt Kraai
ceade5c856
Fix missing header file.
2001-01-29 18:41:12 +00:00
Eric Andersen
8ec10a9483
Fix up copyright msgs. Bump version to 0.49 in preparation for
...
a release. Update the website with release details.
-Erik
2001-01-27 09:33:39 +00:00
Eric Andersen
ed3ef50c23
Fix header file usage -- there were many unnecessary header files included in
...
busybox.h which slowed compiles. I left only what was needed and then fixed up
all the apps to include their own header files. I also fixed naming for pwd.h
and grp.h functions. Tested to compile and run with libc5, glibc, and uClibc.
-Erik
2001-01-27 08:24:39 +00:00
Eric Andersen
ab050f5522
Add in a patch to make busybox use the normal pwd.h and grp.h
...
functions. Add in simple implementations of these functions,
which can, optionally, be used instead of the system versions.
-Erik
2001-01-27 06:01:43 +00:00
Eric Andersen
a528dc7071
Fix my braindamage -- remove termios and sighandling since they are not
...
needed at all. My bad.
-Erik
2001-01-26 18:30:12 +00:00
Eric Andersen
1e4b957ac3
I am an idiot. Looking over my patch, ls doesn't need to do anything
...
more then the ioctl to get the win size. None of the termios handling
crap is needed.
-Erik
2001-01-26 18:09:13 +00:00
Eric Andersen
5c9c8b4b26
Make cin be static
2001-01-26 06:50:46 +00:00
Eric Andersen
5307eca7de
Make ls understand termios.
...
-Erik
2001-01-26 01:52:43 +00:00
Eric Andersen
d35c21587a
Commit Larry Doolittle's buffers-on-stack/buffers-via-malloc patch.
...
-Erik
2001-01-25 23:49:09 +00:00
Eric Andersen
c1b8f1224c
Apply a patch from Brent Priddy <brent.priddy@adtran.com> to add
...
'id -n' support.
-Erik
2001-01-25 05:12:02 +00:00
Eric Andersen
f5d5e77321
more bugs fixed -- found doing regression testing
...
-Erik
2001-01-24 23:34:48 +00:00
Eric Andersen
f6c6d9aacc
Remove the warning messages. By consensus, netkit-tiny doesn't
...
need to happen.
2001-01-24 18:44:54 +00:00
Eric Andersen
24be980004
Fix spelling. s/maintainence/maintenance/
2001-01-24 17:37:07 +00:00
Mark Whitley
59ab025363
#define -> static const int. Also got rid of some big static buffers.
2001-01-23 22:30:04 +00:00
Eric Andersen
e132119f07
Fix silly typo
2001-01-22 22:50:01 +00:00
Eric Andersen
6705986f27
Warn about apps that will be going away in release 0.50
...
-Erik
2001-01-22 22:48:42 +00:00
Richard June
6d0921cc0b
Add HUMAN_READABLE define for -m and -h support in du, df, and ls
...
Add support for -k in du, df, and ls(no define, it's for compatibliity with the GNU utils as bb does -k by default)
Fix bug #1084
2001-01-22 22:35:38 +00:00
Matt Kraai
12f417edbd
Eliminate calls of the form "fprintf(stdout,". Thanks for the idea to
...
Vladimir N. Oleynik.
2001-01-18 02:57:08 +00:00
Matt Kraai
c9acf8c766
Complicate truncate behavior.
2001-01-17 00:21:05 +00:00
Mark Whitley
eb60d8bcd1
Turned some #define constants into static const ints.
2001-01-05 18:19:30 +00:00
Matt Kraai
55bccf315e
Rewrote tail.
2001-01-05 02:57:53 +00:00
Mark Whitley
6c6ea6cba2
Changed email address to codepoet.org, updated list of applets / docs I
...
maintain in AUTHORS.
2001-01-04 22:21:13 +00:00
Matt Kraai
e6e818309e
Improvements from Vladimir N. Oleynik.
2000-12-30 07:46:23 +00:00
Matt Kraai
a9819b2908
Use busybox error handling functions wherever possible.
2000-12-22 01:48:07 +00:00
Eric Andersen
e111d69ca2
Turns out, md5sum was broken anyways. It uses backwards TRUE/FALSE
...
and wasnever updated when TRUE and FALSE were fixed. So kludge it
by doing an #undef TRUE, then define it backwards...
2000-12-20 23:19:42 +00:00
Eric Andersen
70da6a66d2
Fix a warning in sh.c. Remove use of getline() in md5sum since
...
nobody else uses it and it is a GNU extension anyways...
2000-12-20 22:59:16 +00:00
Matt Kraai
5e8c0ffb75
Rewrote.
2000-12-20 20:49:56 +00:00
Matt Kraai
24ac017961
Rewrote dd.
2000-12-18 21:38:57 +00:00
Matt Kraai
1fa1adea2a
Change calls to error_msg.* and strerror to use perror_msg.*.
2000-12-18 03:57:16 +00:00
Matt Kraai
0dab829977
Add missing newlines to error messages.
2000-12-18 03:08:29 +00:00
Eric Andersen
bd193a42a5
Fix from Matt Kraai -- a better way to NULL terminate strings for the
...
my_* passwd and group routines. I should have thought of doing it
this way...
2000-12-13 01:52:39 +00:00
Eric Andersen
483262f633
Patch from Matt Kraai to fix 'dirname /'
2000-12-12 23:27:48 +00:00
Eric Andersen
b12e506d8d
du.c error msg cleanup from Kent Robotti
2000-12-12 23:17:26 +00:00
Eric Andersen
a293a516ad
Patch from kent robotti to fix a buglet where
...
# du doesn't_exist
du: doesn't_exist: No such file or directory
0 doesn't_exist
which was on course wrong. I simplified it a bit...
2000-12-11 17:08:21 +00:00
Eric Andersen
9df3833370
Fix problem where 'du file_that_exists' doesn't work.
2000-12-09 17:07:12 +00:00
Eric Andersen
5b5db38a7d
Patch from Matt Kraai to implement uniq -[cdu]
2000-12-09 16:37:53 +00:00
Mark Whitley
f57c944e09
Changed names of functions in utility.c and all affected files, to make
...
compliant with the style guide. Everybody rebuild your tags file!
2000-12-07 19:56:48 +00:00
Matt Kraai
87afb526b5
Get rid of redundant TRUE and FALSE definitions.
2000-12-07 16:11:50 +00:00
Eric Andersen
8ffabf5825
Patch from Matt Kraai to fix 'echo "1 2 3" | tr -s " "'
...
so it properly outputs "1 2 3".
2000-12-06 22:53:06 +00:00
Matt Kraai
e884970c87
Must compile before committing.
2000-12-06 15:56:31 +00:00
Matt Kraai
92ed8a3519
Fix exit status on failure.
2000-12-06 15:55:23 +00:00
Matt Kraai
d27753afd9
Use perrorMsg instead of perror and keep removing files if we encounter
...
an error.
2000-12-05 05:11:41 +00:00
Eric Andersen
87559829ff
Remove #ifdef __STDC__ junk. We don't do K&R round these parts,
...
so no point acting like we do.
2000-12-01 19:02:24 +00:00
Matt Kraai
3e856ce428
Stop using TRUE and FALSE for exit status.
2000-12-01 02:55:13 +00:00
Eric Andersen
8fff78d66e
Apply the BSD echo version submitted by Jonas Holmberg <jonas.holmberg@axis.com>
2000-11-29 22:40:59 +00:00
Eric Andersen
ddea368dbe
Apply rev #2 of dd fix from Gennady Feldman.
2000-11-29 22:33:02 +00:00
Eric Andersen
7b5d59464f
Apply a patch from Larry Doolittle <ldoolitt@recycle.lbl.gov> to close
...
bug 1069. This shaves about 100 bytes from the executable, and about
200 bytes of heap usage. Also document the "-d" option in the usage
message.
2000-11-29 22:01:42 +00:00
Eric Andersen
cf1189f5a7
Patch from Matt Kraai to fix an infinate loop with ls -aR
2000-11-29 21:52:06 +00:00
Matt Kraai
9a71af54f5
Fix behavior when removal fails.
2000-11-22 01:09:38 +00:00
Matt Kraai
e93abf9e69
Fixed user and group name listing.
2000-11-18 01:08:24 +00:00
Mark Whitley
0053087587
Applied patch from Brent Priddy <brent.priddy@adtran.com> to handle the
...
special-case of using newlines as field delimiters.
2000-11-17 22:02:45 +00:00
Eric Andersen
a683ee81d9
"I will always compile before I commit."
...
"I will always compile before I commit."
"I will always compile before I commit."
-Erik
2000-11-17 18:51:45 +00:00
Eric Andersen
4e573f4729
Remove the BSD advertising clause, and replace it with a link to how
...
the advertising clause has been retroactivly declared null and void.
2000-11-14 23:29:24 +00:00
Eric Andersen
3e07541e5f
This was redundant
2000-10-29 07:02:47 +00:00
Matt Kraai
a5bd26831f
Make features independent.
2000-10-28 06:40:09 +00:00
Matt Kraai
b273d66518
We also need to declare info if the USERNAMES feature is enabled.
2000-10-28 01:21:22 +00:00
Matt Kraai
e8c55f42c1
Fixed error handling and TRUE/FALSE usage.
2000-10-25 19:09:03 +00:00
Matt Kraai
ac1169b20f
Cleaned up error handling and uses of TRUE/FALSE.
2000-10-25 16:38:00 +00:00
Matt Kraai
324a778f31
Added a fatalPerror function to simplify error handling.
2000-10-25 15:10:08 +00:00
Glenn L McGrath
b60208dd8f
Fix for bug #1068 from Kent Robotti
...
Call perror and exit instead of fatalError
2000-10-25 03:31:15 +00:00
Matt Kraai
207061ac0d
Fix error messages.
2000-10-23 18:03:46 +00:00
Matt Kraai
69229a6c92
Piss people off by removing [+-][0-9]+ options from tail.
2000-10-19 21:28:32 +00:00
Matt Kraai
9a6e67c960
Consolidate stat(2) and lstat(2) calls and error handling.
2000-10-13 18:03:21 +00:00
Matt Kraai
33fdae54d1
Exit with failure status if we are unable to list any files or
...
directories. Patch thanks to Kent Robotti <robotti@metconnect.com>.
2000-10-13 17:59:43 +00:00
Eric Andersen
e7e1e2dcad
Apply a patch from Matt Kraai to fix buffer overrun and convert to
...
using synamically allocated storage.
-Erik
2000-10-12 22:40:14 +00:00
Mark Whitley
872138de50
Added cmp and readlink applets from Matt Kraai.
2000-10-09 18:56:47 +00:00
Eric Andersen
7a86e61a54
Patch from Matt Kraai so wc will return a proper error code
...
when failing to open a file, and will not use file when it
didn't open the file.
-Erik
2000-10-09 18:21:44 +00:00
Eric Andersen
958c78f9a1
Apply a patch from Matt Kraai:
...
"The -L option to ls doesn't behave correctly for files listed explicitly
on the command line, only those in directories that are listed. The
appended patch fixes this problem. Would someone please commit it?"
-Erik
2000-10-09 17:51:25 +00:00
Eric Andersen
13241dfbdd
Patch from Matt Kraai: "When it encounters a problem creating a link, ln
...
shouldn't give up entirely but instead continue processing the rest of its
arguments. The attached patch does this."
2000-10-04 16:02:53 +00:00
Glenn L McGrath
aa3908d1b7
Rewrite to use getopt and return instead of exit, a seperate function (fs_link) does the actual work.
2000-10-04 09:34:35 +00:00
John Beppu
8d369e98a5
+ shortened main() a little, and a few aesthetic cleanups here & there.
2000-09-28 17:49:59 +00:00
Matt Kraai
c0321f9bc6
Rewrote head to perservere when it can't open a file, and share code
...
with cat.
2000-09-27 04:09:22 +00:00
Matt Kraai
e7c1af1e0d
Continue concatenating files even if we can't open one.
2000-09-27 03:01:40 +00:00
Matt Kraai
bbaef66b3f
Consolidate handling of some fopen failures.
2000-09-27 02:43:35 +00:00
Matt Kraai
e0bcce09ba
Rewrote uniq to be less than a third of the size, and fixed some other
...
minor problems.
2000-09-27 02:29:39 +00:00
Eric Andersen
3570a34de4
Renamed "internal.h" to the more sensible "busybox.h".
...
-Erik
2000-09-25 21:45:58 +00:00
Matt Kraai
90f580ad5b
Start the great EXIT_{SUCCESS,FAILURE} migration.
2000-09-22 03:45:34 +00:00
Matt Kraai
a2f2a8f8c0
Add support for the -L option to ls.
2000-09-22 03:11:47 +00:00
Eric Andersen
d1de4a16ad
Handle 'cat -'
2000-09-21 02:39:50 +00:00
Eric Andersen
8a2e56c5df
Large file >2Gib support.
2000-09-21 02:23:30 +00:00
Matt Kraai
7c22b77162
Only remove directories when removing recursively.
2000-09-20 23:10:21 +00:00
Eric Andersen
cff3fe3ae9
Added dos2unix, unix2dos, and unrpm.c thanks to robotti@metconnect.com.
...
-Erik
2000-09-20 19:22:26 +00:00
Glenn L McGrath
56a328810b
Fix looping bug, use fullRead
2000-09-13 23:08:07 +00:00
Matt Kraai
322ae93a5e
Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
...
segfaulting or handling errors the same way themselves.
2000-09-13 02:46:14 +00:00
Glenn L McGrath
f0b073f55a
dd now truncates files at the end its write, this can be turned of by
...
specifying conv=notrunc in the command line
This conforms to GNU dd behaviour
2000-09-11 00:32:13 +00:00
Glenn L McGrath
729216cb11
Remove some debugging code
2000-09-10 04:42:20 +00:00
Glenn L McGrath
18310f1ce3
Using seek=? used to cause part of the original file to be zero'ed, i
...
think this was caused by opening the file in truncate mode.
2000-09-10 04:39:37 +00:00
Glenn L McGrath
0ae8e5a645
My previous attempt to make dd use fullRead, fullWrite was very broken,
...
this should actually work.
2000-09-10 01:54:27 +00:00
Eric Andersen
11c655295c
New ls sorting patch, as written by Sterling Huxley, and then updated
...
by kent robotti. I then updated it to use my_getpwuid and my_getgrgid
(per busybox policy).
-Erik
2000-09-07 17:24:47 +00:00
Eric Andersen
1b355ebba6
Added expr, from Edward Betts <edward@debian.org>, with some fixups
...
and docs added by me.
-Erik
2000-09-05 17:37:48 +00:00
Matt Kraai
1638488d26
Rewritten by mistake.
2000-08-28 03:53:27 +00:00
Glenn L McGrath
06aeb6c417
ar.c now uses a linked list to process headers, uses getopt, new internal function extractAr(srcFD, dstFd, filename) to make it easily accessable to other busybox functions.
...
moved copySubFile from ar.c to utilities.c
modified dd.c to use fullWrite
modified copyFile in utilities.c to use copySubFile
2000-08-25 03:50:10 +00:00
Pavel Roskin
3a0f4baf2f
Fixed a warning about a label not being used
2000-08-22 15:47:57 +00:00
Pavel Roskin
8237add8d0
Fixed misuse of type "char"
2000-08-22 15:38:16 +00:00
Eric Andersen
79565b6c91
Add optional ls file sorting, thanks to a patch from
...
Sterling Huxley <sterling@europa.com>
-Erik
2000-08-11 18:10:21 +00:00
Eric Andersen
88f50b6bf5
Some #include updates.
...
-Erik
2000-08-10 17:59:11 +00:00
Eric Andersen
46ade97983
Cleaner way to handle -NUM and +NUM, reduces the mem usage as well.
...
-Erik
2000-08-02 19:57:18 +00:00
Mark Whitley
5ae166813f
Minor cleanup thingy. fprintf(stderr, ...) -> errorMsg().
2000-08-02 18:34:41 +00:00
Mark Whitley
807f0fd637
Brand, new version of cut. This fixes the bugs in the old cut, is smaller, and
...
is a sight easier to understand than the Minix cut.
2000-08-02 18:30:11 +00:00
Eric Andersen
d5fa3e3e9a
Update to the tail rewrite by "Allen Soard" <esp-software@mail.hypermart.net>
...
-Erik
2000-08-02 16:42:58 +00:00
Eric Andersen
98bbd688a8
Commit the rewrite of tail by Allen Soard
...
<esp-software@mail.hypermart.net>. Thanks Allen for
you work at getting this into shape,
-Erik
2000-07-31 17:05:58 +00:00
Pavel Roskin
616d13bcd1
Fixed to pass -Wundef
2000-07-28 19:38:27 +00:00
Eric Andersen
9cf306d55e
Fix for a potential uninitialized variable, thx to
...
Ken Chalmers <chalmers@norscan.com>
-Erik
2000-07-28 19:05:20 +00:00
Eric Andersen
6150df320a
Some cleanups, based on a patch from Ken Chalmers
...
-Erik
2000-07-28 16:22:51 +00:00
Mark Whitley
7ce41ad692
Fixed a syntax error & superfluous param decl that was causing the build to
...
fail.
2000-07-26 18:09:22 +00:00
Eric Andersen
cc10a5b42b
Fix some bitrot.
...
-Erik
2000-07-26 00:52:04 +00:00
Eric Andersen
b040d4f3da
Use BB_FEATURE_CLEAN_UP where appropriate
...
-Erik
2000-07-25 18:01:20 +00:00
Pavel Roskin
e99f7500e0
chroot can now call the builtin shell
2000-07-24 20:15:30 +00:00
Mark Whitley
3950596e1e
Converted option parsing to using getopt(). Also managed to remove an
...
extraneous logic loop that existed only for the purpose of the special case of
only one file. I replaced it with a variable to keep track of the number of
files read.
2000-07-20 00:08:10 +00:00
Mark Whitley
99e370f0c6
Whoops. Forgot to #include <getopt.h>.
2000-07-20 00:03:38 +00:00
Mark Whitley
aa4f108338
Converted option parsing to getopt() and made some minor formatting changes.
2000-07-19 19:38:13 +00:00
Matt Kraai
27a804246a
Centralize handling of --help.
2000-07-19 19:24:01 +00:00
Matt Kraai
2f46b664b7
Add usage messages for applets without them.
2000-07-19 18:01:00 +00:00
Eric Andersen
a16c66335e
Use FatalError()
...
-Erik
2000-07-19 17:36:27 +00:00
Pavel Roskin
cc8a66b113
Moved functions used by "lsmod" from cat.c to utility.c
...
Adjusted to make lsmod and sh compilable as standalone apps.
Comment fixes
2000-07-17 20:18:42 +00:00
Pavel Roskin
47d4926244
The result of getopt() is "int" and should be treated as such
2000-07-17 16:17:19 +00:00
Matt Kraai
bf181b9338
Extract usage information into a separate file.
2000-07-16 20:57:15 +00:00
Matt Kraai
3bd8bd89ee
Don't use strings directly in calls to usage(). This is in preparation
...
for their extraction to a separate file.
2000-07-14 23:28:47 +00:00
Eric Andersen
add09fd558
Getopt'ed by Marc Nijdam <marc_nijdam@hp.com>
...
-Erik
2000-07-14 18:39:08 +00:00
Eric Andersen
17ad45aace
Getopt'rd by Marc Nijdam <marc_nijdam@hp.com>
...
-Erik
2000-07-14 18:38:26 +00:00
Eric Andersen
fad04fdd12
More cleanups.
...
-Erik
2000-07-14 06:49:52 +00:00
Matt Kraai
b870af09ae
Fix argument parsing.
2000-07-14 06:47:33 +00:00
Matt Kraai
d537a95fdb
Use errorMsg rather than fprintf.
2000-07-14 01:51:25 +00:00
Eric Andersen
156959ea93
Fix uninitialized variable.
...
-Erik
2000-07-13 19:49:12 +00:00
Eric Andersen
00143ba921
From Matt Kraai <kraai@alumni.carnegiemellon.edu>
...
> Here is a patch so that tr can handle NULL characters as well. Give it
> a shot and let me know what you think. It is against the latest CVS
> version.
>
> In my tests, the following now works as expected.
>
> tr '\0' '\n'
>
> Later,
> Matt
2000-07-13 16:40:41 +00:00
Matt Kraai
ac48461da9
Correct argument parsing and other minor cleanups.
2000-07-13 06:33:12 +00:00
Matt Kraai
be84cd4ef6
Always report the applet name when doing error reporting.
2000-07-12 17:02:35 +00:00
Matt Kraai
e58771e73c
Use global applet_name instead of local versions.
2000-07-12 15:38:49 +00:00
Matt Kraai
e714bce003
Use global applet_name instead of local versions.
2000-07-12 00:53:06 +00:00
Eric Andersen
0c838af50b
Re-enable ln -n in the help.
...
-Erik
2000-07-11 17:38:27 +00:00
Eric Andersen
195fa15caf
Another patch from Matt Kraai <kraai@alumni.carnegiemellon.edu>:
...
>
> The following patch allows ln -n to function like GNU. It also fixes a
> typo with my previous patch to add support for ln FILE DIRECTORY. And
> it removes some code that checks the maximum length of the filenames. I
> can't figure out why that code is necessary. Anyone know?
>
> Matt
2000-07-11 17:35:32 +00:00
Eric Andersen
c674d70699
Comment on kernel stuff
...
-Erik
2000-07-10 22:57:14 +00:00
Eric Andersen
9b2297a34e
Remove yet more kernel header dependancies.
...
-Erik
2000-07-10 20:08:44 +00:00
Eric Andersen
a0053735dc
Remove unused variable.
...
-Erik
2000-07-10 20:08:09 +00:00
Eric Andersen
0b4551faf5
From Matt Kraai <kraai@alumni.carnegiemellon.edu>:
...
Howdy,
Bug #1006 reports that
ln -s /tmp/foo .
does not work correctly. In fact, it appears that any instantiation of
ln -s FILE... DIRECTORY
does not work. The following patch adds support for this form, which
then fixes the particular instance noted in the bug report.
In the process, I needed the basename function. This appears in the
string.h provided by glibc, but not uC-libc. So I wrote my own to go in
utility.c, called get_last_path_component. I also modified the basename
utility to use this function.
At some point it might be desirous to use the basename from the library
if it exists, and otherwise compile our own. But I don't know how to do
this.
Matt
2000-07-10 16:44:03 +00:00
Eric Andersen
a03d86cf54
Patch from Matt Kraai <kraai@alumni.carnegiemellon.edu>:
...
GNU tr complains on the following:
$ tr a ''
tr: when not truncating set1, string2 must be non-empty
BusyBox tr does not complain:
$ tr a ''
a
^D
0
It should result in an error, not in some spurious output. The attached
patch generates an error.
Matt
2000-07-10 16:38:50 +00:00
Eric Andersen
999bf72f49
More portability updates. Now compiles cleanly vs glibc, libc5, and uclibc
...
(except for mkfs_minix and fsck_minix -- and it doesn't yet link vs uclibc due
to missing stuff in the library).
-Erik
2000-07-09 06:59:58 +00:00
Eric Andersen
bd22ed8067
Update files to reduce dependance on kernel version...
...
-Erik
2000-07-08 18:55:24 +00:00
Eric Andersen
5d893b6beb
Remove MAXNAMLEN and use BUFSIZ instead.
...
-Erik
2000-07-06 01:57:20 +00:00
Eric Andersen
89bc256c94
Remove misguided klude around for 2.4.x-test* brokenness. Al Viro
...
will be removing this stuff from /proc/mounts real soon now I am assured.
-Erik
2000-07-05 19:29:59 +00:00
Eric Andersen
f7cf2f7ef9
* Fix to tr so it recognizes standard escape sequences. Merged common
...
escape seq. code from tr and echo into utility.c. Fix thanks to
Matt Kraai <kraai@alumni.carnegiemellon.edu>.
* This should close Bug #1015 . Please test.
-Erik
2000-07-05 17:26:35 +00:00
Eric Andersen
7c31ea4e29
Added support for ignoring '-g' per GNU ls, thanks to David Vrabel
...
<dvrabel@arcom.co.uk>. Seems some ftp clients expect the '-g' option
to exist.
-Erik
2000-07-03 14:55:49 +00:00
Mark Whitley
1ca41775bb
Yanked out the cstring_alloc() and cstring_lineFromFile() functions from
...
utility.c and replaced them with get_line_from_file() from the new grep.c.
Also changed declaration in internal.h and replaced instances of
cstring_lineFromFile() in dc.c and sort.c with get_line_from_file(). Tested
them and they worked fine.
2000-06-28 22:15:26 +00:00
Eric Andersen
1386e70210
Fixed segfault with 'cut -f 1 -d:' and added 'cut -s' suport.
...
Fix thanks to Arne Bernin <arne@matrix.loopback.org>
-Erik
2000-06-26 12:14:30 +00:00
Eric Andersen
10dc9d4d17
Updates to handle Linux 2.4.0 kernels (kludged around the "none" entries in
...
/proc/mounts, added a hack to make sysinfo work with both old and new kernels).
-Erik
2000-06-26 10:45:52 +00:00
Eric Andersen
6f9985e2f2
Pavel Roskin <proski@gnu.org> just found a nasty memory
...
corruption bug. Disabling 'ln -n' till it is fixed.
-Erik
2000-06-22 00:02:56 +00:00
Eric Andersen
addc9c28ad
Document 'ln --'
...
-Erik
2000-06-21 22:53:24 +00:00
Eric Andersen
b7362e36a8
printf now compiles cleanly under both libc5 and libc6.
...
-Erik
2000-06-19 17:52:17 +00:00
Eric Andersen
b610615be9
Updates to a number of apps to remove warnings/compile errors under libc5.
...
Tested under both libc5 and libc6 and all seems well with these fixes.
-Erik
2000-06-19 17:25:40 +00:00
Pavel Roskin
110fc0cacc
Check for 3 and more arguments was incorrect
...
It is only allowed for linking to a directory
But linking to a directory still fails and may be removed
2000-06-18 00:02:24 +00:00
Pavel Roskin
2e965239ee
ln: fixed command line parser. Added support for "--"
2000-06-15 18:04:40 +00:00
Pavel Roskin
e97da40079
Fixed "rm foo" that had been broken while implementing "rm -- foo"
2000-06-14 17:39:41 +00:00
Eric Andersen
2b6ab3cbf8
Add new apps md5sum uudecode uuencode, fix some minor formatting things.
...
-Erik
2000-06-13 06:54:53 +00:00
Eric Andersen
a42982e8f5
* Fixed 'swapon -a' and 'swapoff -a', which were broken.
...
* Fixed 'mount -a' so it works as expected.
* Implemented 'ls -R' (enabled by enabling BB_FEATURE_LS_RECURSIVE)
-Erik
2000-06-07 17:28:53 +00:00
Eric Andersen
1f6262b8e2
Fix 'date -u'
...
-Erik
2000-06-06 22:17:43 +00:00
Eric Andersen
815e904470
Fixed a bunch of stuff:
...
* Fixed segfault caused by "touch -c"
* Fixed segfault caused by "rm -f"
* Fixed segfault caused by "ln -s -s" and similar abuses.
* Fixed segfault caused by "cp -a -a" and similar abuses.
* Implemented "rm -- <foo>"
updated docs accordingly.
-Erik
2000-06-06 16:15:23 +00:00
Eric Andersen
46a38dbb9b
Don't allow mkfifo to create files such as "--help"
...
This patch checks if the name of FIFO to be created begins with "-" and
calls usage() if it does.
Regards,
Pavel Roskin
2000-06-04 05:17:35 +00:00
Eric Andersen
5a0a2aa00b
Fix touch so it behaves itself (it could segfault in some cases).
...
Fix uname help info formatting.
-Erik
2000-06-02 23:26:44 +00:00
Eric Andersen
808d03ec19
This is a fix for chroot
...
- Fixed error message when the command is not specified (possibly crash on
libc5 systems!)
- Debugging output removed
- Using fatalError() whenever appropriate
Regards,
Pavel Roskin
2000-06-02 17:56:45 +00:00
Eric Andersen
9c8ffa02f4
Pavel fixed a segfault in yes.
...
-Erik
2000-06-02 17:51:39 +00:00
Eric Andersen
86ab8a32bd
A number of additional fixed from Pavel Roskin, note some more bugs in the
...
TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox,
which is now included.
-Erik
2000-06-02 03:21:42 +00:00
Erik Andersen
330fd2b576
More libc portability updates, add in the website (which has not been
...
archived previously). Wrote 'which' during the meeting today.
-Erik
2000-05-19 05:35:19 +00:00
Erik Andersen
5b46d792f1
Some more portability updates
...
-Erik
2000-05-17 05:24:24 +00:00
Erik Andersen
499f65fb98
Some updates for better portability.
...
-Erik
2000-05-16 20:07:38 +00:00
Erik Andersen
73c8c9cf9a
More doc updates
...
-Erik
2000-05-13 05:36:13 +00:00
Erik Andersen
7ab9c7ee52
Lots of updates. Finished implementing BB_FEATURE_TRIVIAL_HELP
...
which lets you compile out most of the "--help" output, saving
up to 17k.
Renamed mnc to nc.
-Erik
2000-05-12 19:41:47 +00:00
Erik Andersen
59b9e87024
* cp -fa now works as expected for symlinks (it didn't before)
...
* zcat works again (wasn't working since option parsing was broken)
* more doc updates/more support for BB_FEATURE_SIMPLE_HELP
-Erik
2000-05-10 05:05:45 +00:00
Erik Andersen
ac130e1dca
Add suffix stripping support to basename
...
-Erik
2000-05-10 05:00:31 +00:00
Erik Andersen
5afc864422
More stuff
...
-Erik
2000-05-02 00:07:56 +00:00
Erik Andersen
8f8d6d5f2d
Due to the license change I can now use Minix code. Minix tr
...
(adapted) now replaces BSD tr. Goes from 5k to 1k, and eliminates
bsearch from the list of libc symbols.
-Erik
2000-05-01 22:30:37 +00:00
Erik Andersen
9b7d964581
My little adventure of analyzing lib usage has already rooted out
...
a big "P" Policy violator -- logname was using getlogin(3), which uses
utmp under the hood. We don't need no stinkin' utmp (and if we
are using tinylogin, it is unlikely to be useful trying).
-Erik
2000-05-01 19:49:20 +00:00
Erik Andersen
94f5e0ba7c
Some accrued fixes/updates.
...
* cp/mv now accepts (and ignores) the -f flag, since it always
does force anyway
* tail can now accept -<num> commands (e.g. -10) for better
compatibility with the standard tail command
* added a simple id implementation; doesn't support supp. groups yet
2000-05-01 19:10:52 +00:00
Erik Andersen
6ed02a0ee0
Fix stupid bugs. update was segfaulting. mknod minor # was always 0
...
due to a parsing bug. Oops.
-Erik
2000-04-28 22:10:34 +00:00
Erik Andersen
4f3f757d56
Latest and greatest. Some effort at libc5 (aiming towards newlib)
...
compatability.
-Erik
2000-04-28 00:18:56 +00:00
Erik Andersen
1d1d95051a
More Doc updates. cmdedit and more termio fixes.
2000-04-21 01:26:49 +00:00
John Beppu
91e581fa04
- grep -v ^\.PHONY < Makefile
...
+ busybox.def.h
BB_FEATURE_TRIVIAL_HELP
+ uname.c has an example of how BB_FEATURE_TRIVIAL_HELP
is to be applied.
2000-04-17 17:49:44 +00:00
Erik Andersen
26702fe191
Bugfixes.
...
-Erik
2000-04-17 16:44:46 +00:00
Erik Andersen
e5b6c7dd9c
More updates to the docs, and fixes to sync things with the docs.
...
-Erik
2000-04-17 16:16:10 +00:00
John Beppu
5a728cfdfe
+ in the interest of robustness, I added
...
utility.c :: cstring_alloc()
utility.c :: cstring_lineFromFile() /* they're at the bottom */
so that I could read in lines of arbitrary length from FILE*s
(instead of using fgets(huge_ass_buffer,...)).
+ I tested it out on sort, and it seems to be fine.
2000-04-17 04:22:09 +00:00
Erik Andersen
5e1189e187
More documentation updates, and minor fixes to make things sync
...
up with the docs.
-Erik
2000-04-15 16:34:54 +00:00
Erik Andersen
9cf3bfa7c1
More doc updates for BusyBox, with fixes to apps for bugs revealed
...
while trying to write docs . :-)
-Erik
2000-04-13 18:49:43 +00:00
Erik Andersen
61677feff7
Upates to include copyright 2000 to everything
...
-Erik
2000-04-13 01:18:56 +00:00
Erik Andersen
93d6513d93
Some more minor updates to better use some gcc attributes.
...
-Erik
2000-04-06 08:06:36 +00:00
Erik Andersen
cbb0a4b40d
Oops. Forgot the usleep.c file.
...
/me dons a paper bag.
-Erik
2000-04-04 18:52:02 +00:00
Erik Andersen
3364d78b18
Yet another installment in the ongoing tar saga
...
-Erik
2000-03-28 00:58:14 +00:00
Erik Andersen
1ad302ac90
The new tar for busybox is now done, and works just fine
...
for extracting files. Creation of tarballs is next...
-Erik
2000-03-24 00:54:46 +00:00
Erik Andersen
298854f029
My latest ramblings.
...
-Erik
2000-03-23 01:09:18 +00:00
Erik Andersen
ec5bd90916
Use the nice new find_real_root_device function to find the
...
name of the root device, instead of having libc read whatever
lies happen to be in /etc/mtab.
-Erik
2000-03-22 07:12:05 +00:00
Erik Andersen
0d068a2067
* all mallocs now use xmalloc (and so are OOM error safe), and
...
the common error handling saves a few bytes. Thanks to
Bob Tinsley <bob@earthrise.demon.co.uk> for the patch.
-Erik
2000-03-21 22:32:57 +00:00
Erik Andersen
13456d1fcd
Forgot these files...
...
-Erik
2000-03-16 08:09:57 +00:00
John Beppu
692a4502b0
+ changed a static array (FileList) into a dynamically allocated one
...
in an attempt to make the .bss section smaller.
2000-03-08 00:14:35 +00:00
Erik Andersen
fb002d0df0
Add in tr and dirname
...
-Erik
2000-03-05 08:07:00 +00:00
Erik Andersen
029011b9ee
A few updates (including the cp fix the Craig has been looking for)
...
-Erik
2000-03-04 21:19:32 +00:00
Erik Andersen
42387e4964
Forgot to add basename. More fixes to du from
...
Friedrich Vedder <fwv@myrtle.lahn.de>.
-Erik
2000-02-21 17:27:17 +00:00
Erik Andersen
27fdd081ef
Fixed du. Now behaves just like GNU du (only less so).
...
-Erik
2000-02-19 18:16:49 +00:00
Erik Andersen
e272915e1f
Some updates for the day,
...
-Erik
2000-02-18 21:34:17 +00:00
John Beppu
08c965a0a1
- I suspect the problem has something to do w/ symlinks.
...
- It's not completely in agreement w/ GNU/du, but
+ the answer is much closer than before.
- Some of the right-shifts seem to have mysteriously disappeared.
I put them back in.
2000-02-13 04:10:57 +00:00
Erik Andersen
9ffdaa647e
Updates
...
-Erik
2000-02-11 21:55:04 +00:00
Erik Andersen
e49d5ecbbe
Some formatting updates (ran the code through indent)
...
-Erik
2000-02-08 19:58:47 +00:00
Erik Andersen
fac10d7c59
A few minor updates. ;-)
...
Seriously though, read the Changelog for busybox 0.42,
which this is about to become...
-Erik
2000-02-07 05:29:42 +00:00
Erik Andersen
04e97024e7
Clear up some ambiguity with old style assignments.
...
-Erik
2000-01-29 07:06:24 +00:00
Erik Andersen
ccc7488615
Fixed ls formatting for 8 char user names.
...
-Erik
2000-01-27 02:40:21 +00:00
Erik Andersen
3fe39dce5d
Some busybox updates. See the changelog for details if you care.
...
-Erik
2000-01-25 18:13:53 +00:00
Erik Andersen
5509af7073
* added (and documented) "-n" option for head -
...
contributed Friedrich Vedder <fwv@myrtle.lahn.de>
* Cleanup for a number of usage messages -- also
contributed Friedrich Vedder <fwv@myrtle.lahn.de>
-Erik
2000-01-23 18:19:02 +00:00
Erik Andersen
3163821967
Sync up busybox with the latest and greatest. This is not stuff for
...
the Embedix release.
-Erik
2000-01-15 22:28:50 +00:00
Erik Andersen
05df239ed9
Bug fixes.
...
-Erik
2000-01-13 04:43:48 +00:00
Erik Andersen
1dbc17f630
Fix cp and mv so 'cp foo/README bar' where foo and bar are directories,
...
and README is a file.
-Erik
2000-01-08 21:16:29 +00:00
Erik Andersen
812d46667d
More minor fixes.
...
-Erik
2000-01-07 18:30:40 +00:00
John Beppu
9d83165d9e
added uniq_usage message
2000-01-07 01:57:32 +00:00
John Beppu
96f1f33e56
did tedious stuff
2000-01-06 23:49:21 +00:00
Erik Andersen
0b874ed41f
Cool. Beppu is doing uniq.
...
-Erik
2000-01-06 01:14:56 +00:00
John Beppu
abb4772b28
i am busybox of borg. unix will be assimilated.
2000-01-06 00:48:21 +00:00
Erik Andersen
0881de706e
The latest and greatest. init basically works, though needs
...
a minor inittab design change to accomodate specifying the device
to run each process on.
-Erik
2000-01-05 09:34:26 +00:00
Erik Andersen
7dc160721e
Bunches of fixes. Typos, bugs, etc.
...
Added 'gunzip -t'. inittab support _almost_ works (but it isn't
ready for prime time useage yet).
-Erik
2000-01-04 01:10:25 +00:00
Erik Andersen
1266a13e1f
* sed now supports addresses (numeric or regexp, with negation) and
...
has an append command, thanks to Marco Pantaleoni <panta@prosa.it>
* Fixed dmesg. It wasn't parsing its options (-n or -s) properly.
* Some cosmetic fixes to ls output formatting to make it behave more
like GNU ls.
-Erik
1999-12-29 22:19:46 +00:00
Erik Andersen
f664c004db
Fixed mv so it now does the right thing (same method used in cp). Removed
...
some cruft from cp.
-Erik
1999-12-29 02:36:29 +00:00
Erik Andersen
2fe08c7afb
Fixed cp so it works as God intended it to.
...
-Erik
1999-12-29 02:10:35 +00:00
John Beppu
00417a38c1
sort is good to go.
1999-12-23 22:46:10 +00:00
John Beppu
ee512a3f86
implemented numeric sort (sort -g)
1999-12-23 00:02:49 +00:00
John Beppu
568cb7b45f
oops.. qsort(2) misunderstanding on my part.
...
it's ok, now.
1999-12-22 23:02:12 +00:00
John Beppu
d19385e160
playing w/ $Log$
1999-12-22 22:27:01 +00:00
John Beppu
f3e59041b5
the base is nearly done.
...
need to implement various comparison functions, now.
1999-12-22 22:24:52 +00:00
John Beppu
019513a59f
added hooks for sort
1999-12-22 17:57:31 +00:00
John Beppu
38efa7902e
work in progress...
1999-12-22 00:30:29 +00:00
John Beppu
c0ca473af9
this is my work in progress.
1999-12-21 20:00:35 +00:00
Erik Andersen
10c341af35
Make head --version do the right thing. Update TODO list
...
-Erik
1999-12-17 18:52:06 +00:00
Erik Andersen
4d1d0113fd
Reworked the source so it will compile and run under glibc 2.0.7
...
and linux kernel 2.0.36 (though the dubious reasons why someone
would want to do that defy imagination ;)
-Erik
1999-12-17 18:44:15 +00:00
John Beppu
0aa6118167
killed an elusive bug in du -s.
1999-12-16 21:16:47 +00:00
John Beppu
25ab653457
fixed an embarrasing segfault (head w/ no args
...
used to die (but now it lives))
1999-12-15 19:29:09 +00:00
John Beppu
e1618e42a8
Implemented du -s
1999-12-15 18:52:17 +00:00
Eric Andersen
19db07b3d4
Ok, so this is reallt 0.38...
...
-Erik
1999-12-11 08:41:28 +00:00
John Beppu
b52a218c95
Removed a redundant call du(); Save cpu cycles.
1999-12-10 15:23:47 +00:00
Eric Andersen
cf53687376
Fixed John's email address again.
...
John. Your email address is "john@lineo.com" not @line.com. :)
-Erik
1999-12-10 08:29:20 +00:00
Eric Andersen
2cb55077e2
Added poweroff (and adjusted init to use it). Inlined function
...
calls to code only called once in tee. Made BB_KLOGD and option.
-Erik
1999-12-10 08:25:07 +00:00
John Beppu
3157b1fba9
Implemented head(1).
...
tried to mimic GNU behaviour.
1999-12-10 07:42:50 +00:00
John Beppu
a3e0d7928b
changed tee_usage from being a function to a char[]
...
that gets used be usage();
1999-12-10 07:41:03 +00:00
John Beppu
9835541c54
Fixed bug when dealing with files specified
...
on the command line that didn't exist.
1999-12-10 07:40:08 +00:00
Eric Andersen
70e2f0b111
Fix beppu's email address.
...
BTW, John, go to sleep. It is late. :)
-Erik
1999-12-10 06:45:42 +00:00
John Beppu
14c82b64c9
Fleshed out du_main().
...
I'm not sure which options to support.
1999-12-10 06:15:27 +00:00
John Beppu
059f152a7a
Implemented tee(1).
1999-12-10 05:27:16 +00:00
John Beppu
0f5e1ab949
This is my preliminary
...
du implementation. It
was written from scratch
(doesn't use recursiveAction).
I still need to flesh out
du_main().
1999-12-09 18:23:54 +00:00
Eric Andersen
1792f8c489
Tail now works (costs 6k). Several other updates.
...
-Erik
1999-12-09 06:11:36 +00:00
Eric Andersen
abc0f4f8f9
Latest and greatest
1999-12-08 23:19:36 +00:00
Eric Andersen
b186d980d6
Stuf
1999-12-03 09:19:54 +00:00
Eric Andersen
c054b21f7d
Stuf
1999-11-27 17:41:29 +00:00
Eric Andersen
394f764e7d
Stuf
1999-11-23 21:38:12 +00:00
Eric Andersen
cb41c2e83b
Bug fixes
1999-11-22 07:41:00 +00:00
Eric Andersen
e1850ddde4
Stuf
1999-11-19 05:42:32 +00:00
Eric Andersen
6a76e652aa
Stuf
1999-11-19 05:31:45 +00:00
Eric Andersen
08b1034f4f
Stuf
1999-11-19 02:38:58 +00:00
Eric Andersen
ded6259f62
Latest and greatest
1999-11-18 00:19:26 +00:00
Eric Andersen
d80e851dc0
Stuf
1999-11-16 00:46:00 +00:00
Eric Andersen
a9c95ea655
Updates
1999-11-15 17:33:30 +00:00
Eric Andersen
b6a44b8d39
updates for the day
1999-11-13 04:47:09 +00:00