oweals/busybox.git
24 years agoFix bug#1043 -- hanlde long filenames and links (in this case, by complaining
Eric Andersen [Sun, 24 Sep 2000 00:54:37 +0000 (00:54 -0000)]
Fix bug#1043 -- hanlde long filenames and links (in this case, by complaining
that thay exist and skipping such files when extracting and when archiving.
 -Erik

24 years agoFix an obscure option parsing bug.
Eric Andersen [Sat, 23 Sep 2000 22:36:24 +0000 (22:36 -0000)]
Fix an obscure option parsing bug.

24 years agoForce optind=1 for libc5 when doing cp in cp_mv.c
Eric Andersen [Sat, 23 Sep 2000 20:55:59 +0000 (20:55 -0000)]
Force optind=1 for libc5 when doing cp in cp_mv.c

24 years agoFix potential memory overrun...
Eric Andersen [Sat, 23 Sep 2000 19:56:46 +0000 (19:56 -0000)]
Fix potential memory overrun...

24 years agoFix the bandaid.
Eric Andersen [Sat, 23 Sep 2000 19:55:59 +0000 (19:55 -0000)]
Fix the bandaid.

24 years agoFix memory problems, and make behavior correct.
Eric Andersen [Sat, 23 Sep 2000 19:53:31 +0000 (19:53 -0000)]
Fix memory problems, and make behavior correct.

24 years agoupdate docs for xargs
Eric Andersen [Sat, 23 Sep 2000 06:12:34 +0000 (06:12 -0000)]
update docs for xargs

24 years agoupdate usage for xargs
Eric Andersen [Sat, 23 Sep 2000 06:11:03 +0000 (06:11 -0000)]
update usage for xargs

24 years agorewrite, so it should be firly clean now
Eric Andersen [Sat, 23 Sep 2000 06:10:14 +0000 (06:10 -0000)]
rewrite, so it should be firly clean now

24 years agoUse minix xargs instead, and update docs accordingly
Eric Andersen [Fri, 22 Sep 2000 20:22:28 +0000 (20:22 -0000)]
Use minix xargs instead, and update docs accordingly
 -Erik

24 years agoComment on xargs choice.
Eric Andersen [Fri, 22 Sep 2000 20:02:34 +0000 (20:02 -0000)]
Comment on xargs choice.

24 years agoAdd in xargs
Eric Andersen [Fri, 22 Sep 2000 20:01:23 +0000 (20:01 -0000)]
Add in xargs

24 years agoStart the great EXIT_{SUCCESS,FAILURE} migration.
Matt Kraai [Fri, 22 Sep 2000 03:45:34 +0000 (03:45 -0000)]
Start the great EXIT_{SUCCESS,FAILURE} migration.

24 years agoClean up error messages.
Matt Kraai [Fri, 22 Sep 2000 03:36:27 +0000 (03:36 -0000)]
Clean up error messages.

24 years agoAdd support for the -L option to ls.
Matt Kraai [Fri, 22 Sep 2000 03:11:47 +0000 (03:11 -0000)]
Add support for the -L option to ls.

24 years agoFix loop.h dependencies.
Matt Kraai [Fri, 22 Sep 2000 02:33:29 +0000 (02:33 -0000)]
Fix loop.h dependencies.

24 years agoApply a bandaid suggested by Jon McClintock <jonm@bluemug.com>, since deallocvt
Eric Andersen [Fri, 22 Sep 2000 00:40:39 +0000 (00:40 -0000)]
Apply a bandaid suggested by Jon McClintock <jonm@bluemug.com>, since deallocvt
has code for handling no arguments, but the usage checking code aborted if
there are any other than two arguments.
 -Erik

24 years agoFix for bug #1042 -- applied the patch from Larry Doolittle
Eric Andersen [Fri, 22 Sep 2000 00:38:07 +0000 (00:38 -0000)]
Fix for bug #1042 -- applied the patch from Larry Doolittle
<ldoolitt@recycle.lbl.gov> to fix the bug.
 -Erik

24 years agoBetter cross libc compatibility (so Dave Cinege can stop complaining
Eric Andersen [Fri, 22 Sep 2000 00:22:10 +0000 (00:22 -0000)]
Better cross libc compatibility (so Dave Cinege can stop complaining
that I broke it).
 -Erik

24 years agoDecouple DODEBUG and DOSTATIC
Eric Andersen [Thu, 21 Sep 2000 22:26:02 +0000 (22:26 -0000)]
Decouple DODEBUG and DOSTATIC

24 years agoRemove all the kernel headers so it will compile under libc5
Eric Andersen [Thu, 21 Sep 2000 04:09:58 +0000 (04:09 -0000)]
Remove all the kernel headers so it will compile under libc5
 -Erik

24 years agoFix a potential warning
Eric Andersen [Thu, 21 Sep 2000 04:05:38 +0000 (04:05 -0000)]
Fix a potential warning

24 years agoAdd in exec support (patch from Torbj?rn Axelsson <torax@cendio.se>)
Eric Andersen [Thu, 21 Sep 2000 02:48:07 +0000 (02:48 -0000)]
Add in exec support (patch from Torbj?rn Axelsson <torax@cendio.se>)
and disable backticks (since they are still wierdly broken in some
cases.

24 years agoHandle 'cat -'
Eric Andersen [Thu, 21 Sep 2000 02:39:50 +0000 (02:39 -0000)]
Handle 'cat -'

24 years agoHard code the name of init.
Eric Andersen [Thu, 21 Sep 2000 02:32:11 +0000 (02:32 -0000)]
Hard code the name of init.

24 years agoLarge file >2Gib support.
Eric Andersen [Thu, 21 Sep 2000 02:23:30 +0000 (02:23 -0000)]
Large file >2Gib support.

24 years agoTypo fix.
Eric Andersen [Thu, 21 Sep 2000 02:06:35 +0000 (02:06 -0000)]
Typo fix.

24 years agoIgnore loop.h
Eric Andersen [Thu, 21 Sep 2000 02:05:43 +0000 (02:05 -0000)]
Ignore loop.h

24 years agoMore portable handling of loop header files, as done in util-linux
Eric Andersen [Thu, 21 Sep 2000 02:04:51 +0000 (02:04 -0000)]
More portable handling of loop header files, as done in util-linux

24 years agoRemove a warning. Patch from Bryan Rittmeyer <bryan@ixiacom.com>
Eric Andersen [Thu, 21 Sep 2000 01:33:05 +0000 (01:33 -0000)]
Remove a warning.  Patch from Bryan Rittmeyer <bryan@ixiacom.com>

24 years agoOnly remove directories when removing recursively.
Matt Kraai [Wed, 20 Sep 2000 23:10:21 +0000 (23:10 -0000)]
Only remove directories when removing recursively.

24 years agoAdded dos2unix, unix2dos, and unrpm.c thanks to robotti@metconnect.com.
Eric Andersen [Wed, 20 Sep 2000 19:22:26 +0000 (19:22 -0000)]
Added dos2unix, unix2dos, and unrpm.c thanks to robotti@metconnect.com.
 -Erik

24 years agoWhen mounting a ro fs rw, print warning and then mount it ro. Patch
Eric Andersen [Wed, 20 Sep 2000 06:23:36 +0000 (06:23 -0000)]
When mounting a ro fs rw, print warning and then mount it ro.  Patch
from Dave Cinege.
 -Erik

24 years agoReturn failure if ping gets no response.
Matt Kraai [Wed, 20 Sep 2000 04:33:30 +0000 (04:33 -0000)]
Return failure if ping gets no response.

24 years agoReverted my conversion of tar to getopt to ensure tar can
Eric Andersen [Tue, 19 Sep 2000 21:35:14 +0000 (21:35 -0000)]
Reverted my conversion of tar to getopt to ensure tar can
handle traditional semantics (i.e. 'tar -xvf -' or 'tar xvf'
now both work).
 -Erik

24 years agoBoth of these commands were subtly broken. Fortunately when used together the
Eric Andersen [Tue, 19 Sep 2000 21:13:55 +0000 (21:13 -0000)]
Both of these commands were subtly broken.  Fortunately when used together the
damage was only ugly fscks.  Reverted to the static inline code so they work
correctly again,
 -Erik

24 years agoI think these featires are fairly safe...
Eric Andersen [Tue, 19 Sep 2000 07:16:39 +0000 (07:16 -0000)]
I think these featires are fairly safe...
 -Erik

24 years agoAvoid segfaults by not using snprintf to copy strings.
Matt Kraai [Tue, 19 Sep 2000 06:46:44 +0000 (06:46 -0000)]
Avoid segfaults by not using snprintf to copy strings.

24 years agoClean up output.
Matt Kraai [Tue, 19 Sep 2000 05:25:12 +0000 (05:25 -0000)]
Clean up output.

24 years agoOnly defines functions that will compile and are usefull under the
Glenn L McGrath [Tue, 19 Sep 2000 02:25:36 +0000 (02:25 -0000)]
Only defines functions that will compile and are usefull under the

24 years agoApply a patch from Chip Rosenthal <chip@unicom.com> to fix NFS mounting,
Eric Andersen [Tue, 19 Sep 2000 01:21:13 +0000 (01:21 -0000)]
Apply a patch from Chip Rosenthal <chip@unicom.com> to fix NFS mounting,
which had been inadvertantly broken...
 -Erik

24 years agoRemove definition of basename.
Glenn L McGrath [Mon, 18 Sep 2000 10:20:16 +0000 (10:20 -0000)]
Remove definition of basename.
It was defined out so that it would never be seen, and if it was ever seen it wasnt used for anything. It also stops gunzip compiling under the Hurd.

24 years agoPath count was out by one, fixed it
Glenn L McGrath [Mon, 18 Sep 2000 09:52:03 +0000 (09:52 -0000)]
Path count was out by one, fixed it

24 years agoSimplify and remove dependence on PATH_MAX
Glenn L McGrath [Mon, 18 Sep 2000 09:37:40 +0000 (09:37 -0000)]
Simplify and remove dependence on PATH_MAX

buf[PATH_MAX] now defined using strlen to the exact size to be used.
removed output that was displayed if which didnt find the command, this makes itmatch the behaviour of GNU's which.
These modifications result in a slight size decrease.

24 years agoUpdated stdin/stdout treatment to match that of gnu tar.
Matt Kraai [Fri, 15 Sep 2000 22:47:34 +0000 (22:47 -0000)]
Updated stdin/stdout treatment to match that of gnu tar.

24 years agoReorganize listing code.
Matt Kraai [Fri, 15 Sep 2000 22:23:41 +0000 (22:23 -0000)]
Reorganize listing code.

24 years agoAllow non-verbose listing to work.
Matt Kraai [Fri, 15 Sep 2000 21:18:43 +0000 (21:18 -0000)]
Allow non-verbose listing to work.

24 years agoUpdated to be in sync with the current sample inittab
Pavel Roskin [Fri, 15 Sep 2000 17:24:13 +0000 (17:24 -0000)]
Updated to be in sync with the current sample inittab

24 years agoFixed compliance with the DTD
Pavel Roskin [Fri, 15 Sep 2000 17:16:40 +0000 (17:16 -0000)]
Fixed compliance with the DTD

24 years ago+ credit markw@lineo.com for his contributions
John Beppu [Fri, 15 Sep 2000 08:04:42 +0000 (08:04 -0000)]
+ credit markw@lineo.com for his contributions

24 years agoDon't suppress output of umount and swapoff - it is both unwise
Pavel Roskin [Fri, 15 Sep 2000 01:34:17 +0000 (01:34 -0000)]
Don't suppress output of umount and swapoff - it is both unwise
and incompatible with lash that doesn't support >&1 yet.

24 years agoDon't suppress output of umount and swapoff - it is both unwise
Pavel Roskin [Fri, 15 Sep 2000 01:02:50 +0000 (01:02 -0000)]
Don't suppress output of umount and swapoff - it is both unwise
and incompatible with lash that doesn't support >&1 yet.

24 years ago"exit NUMBER" should exit, not return
Pavel Roskin [Fri, 15 Sep 2000 00:46:51 +0000 (00:46 -0000)]
"exit NUMBER" should exit, not return

24 years agoFor "askfirst" don't just read one char from stdin,
Pavel Roskin [Thu, 14 Sep 2000 22:47:29 +0000 (22:47 -0000)]
For "askfirst" don't just read one char from stdin,
read the whole line using getc(), so that everything before Enter
gets discarded.

24 years agoAdd in a patch from robotti@metconnect.com and Chip Rosenthal to make
Eric Andersen [Thu, 14 Sep 2000 22:01:31 +0000 (22:01 -0000)]
Add in a patch from robotti@metconnect.com and Chip Rosenthal to make
init do login shell stuff.
 -Erik

24 years agoNote the syslogd bug fix
Eric Andersen [Thu, 14 Sep 2000 21:56:18 +0000 (21:56 -0000)]
Note the syslogd bug fix

24 years agoBug fix for wget, and proper attribution of Chip Rosenthal and
Eric Andersen [Thu, 14 Sep 2000 21:46:30 +0000 (21:46 -0000)]
Bug fix for wget, and proper attribution of Chip Rosenthal and
Covad Communications for the contribution of wget.
 -Erik

24 years agoFix the halt/reboot/poweroff segfault when used from within an initrd...
Eric Andersen [Thu, 14 Sep 2000 21:12:20 +0000 (21:12 -0000)]
Fix the halt/reboot/poweroff segfault when used from within an initrd...
 -Erik

24 years agoBackslashes shouldn't be treated as backticks.
Matt Kraai [Thu, 14 Sep 2000 00:43:20 +0000 (00:43 -0000)]
Backslashes shouldn't be treated as backticks.

24 years agoCopy the string terminator.
Matt Kraai [Thu, 14 Sep 2000 00:26:50 +0000 (00:26 -0000)]
Copy the string terminator.

24 years agoFix looping bug, use fullRead
Glenn L McGrath [Wed, 13 Sep 2000 23:08:07 +0000 (23:08 -0000)]
Fix looping bug, use fullRead

24 years agoAdd in BasicLinux by request
Eric Andersen [Wed, 13 Sep 2000 23:06:41 +0000 (23:06 -0000)]
Add in BasicLinux by request

24 years agoAdded _install
Pavel Roskin [Wed, 13 Sep 2000 16:52:32 +0000 (16:52 -0000)]
Added _install

24 years agoEnsure forked processes always are on a controlling tty, so the
Eric Andersen [Wed, 13 Sep 2000 16:15:29 +0000 (16:15 -0000)]
Ensure forked processes always are on a controlling tty, so the
^C can be properly sent to /dev/console.
 -Erik

24 years agoMake syslogd ignore SIGCLD only if SIGCLD is defined. This should fix SPARC.
Pavel Roskin [Wed, 13 Sep 2000 14:14:29 +0000 (14:14 -0000)]
Make syslogd ignore SIGCLD only if SIGCLD is defined. This should fix SPARC.
Also ignore SIGCHLD - it must have been meant.

24 years agoList of signals updated from util-linux-2.10o
Pavel Roskin [Wed, 13 Sep 2000 14:03:48 +0000 (14:03 -0000)]
List of signals updated from util-linux-2.10o
Architecture names are no longer used - should now compile on SPARC

24 years agoDon't fork for the . (source) command so that environment settings are
Matt Kraai [Wed, 13 Sep 2000 03:43:36 +0000 (03:43 -0000)]
Don't fork for the . (source) command so that environment settings are
preserved.

24 years agoFix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead of
Matt Kraai [Wed, 13 Sep 2000 02:46:14 +0000 (02:46 -0000)]
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.

24 years agoFix unchecked calls to {m,c,re}alloc so that they print an error and
Matt Kraai [Wed, 13 Sep 2000 02:08:21 +0000 (02:08 -0000)]
Fix unchecked calls to {m,c,re}alloc so that they print an error and
exit rather than segfaulting (what an improvement).

24 years agoTypo fix: resolv -> resolve
Pavel Roskin [Tue, 12 Sep 2000 22:05:17 +0000 (22:05 -0000)]
Typo fix: resolv -> resolve

24 years agoFormatting cleanup patch from Bryan Rittmeyer <bryan@ixiacom.com>.
Eric Andersen [Tue, 12 Sep 2000 16:20:49 +0000 (16:20 -0000)]
Formatting cleanup patch from Bryan Rittmeyer <bryan@ixiacom.com>.
 -Erik

24 years agoFix .deb unpack and experimental TAR support
Glenn L McGrath [Mon, 11 Sep 2000 05:25:39 +0000 (05:25 -0000)]
Fix .deb unpack and experimental TAR support

The previous ar.c fialed to recognise one record in .debs

Experimental tar support, this is currently *very* cheap because ar and
tar are functionally similar. It  will need lots of testing so by
default tar support code is defined out.
To test uncomment the line "#define BB_AR_EXPERIMENTAL_UNTAR"

24 years agoExtra defines for ar
Glenn L McGrath [Mon, 11 Sep 2000 05:06:13 +0000 (05:06 -0000)]
Extra defines for ar

24 years agoSimplify a few little things, and merge in a patch from
Eric Andersen [Mon, 11 Sep 2000 04:55:31 +0000 (04:55 -0000)]
Simplify a few little things, and merge in a patch from
robotti@metconnect.com so that 'ar -xv' and 'ar -x -v'
both work.
 -Erik

24 years agoNew dd behaviour
Glenn L McGrath [Mon, 11 Sep 2000 00:33:09 +0000 (00:33 -0000)]
New dd behaviour

24 years agodd now truncates files at the end its write, this can be turned of by
Glenn L McGrath [Mon, 11 Sep 2000 00:32:13 +0000 (00:32 -0000)]
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

24 years agoMAke lsmod act just like modutils lsmod, by printing which modules use
Eric Andersen [Sun, 10 Sep 2000 16:16:00 +0000 (16:16 -0000)]
MAke lsmod act just like modutils lsmod, by printing which modules use
other modules, and state info like (deleted) and such.
 -Erik

24 years agoMake init handle current 2.4.x sysinfo behavior
Eric Andersen [Sun, 10 Sep 2000 16:13:41 +0000 (16:13 -0000)]
Make init handle current 2.4.x sysinfo behavior
 -Erik

24 years agoUpdate free for current 2.4.x behavior...
Eric Andersen [Sun, 10 Sep 2000 16:10:41 +0000 (16:10 -0000)]
Update free for current 2.4.x behavior...
 -Erik

24 years agoRemove some debugging code
Glenn L McGrath [Sun, 10 Sep 2000 04:42:20 +0000 (04:42 -0000)]
Remove some debugging code

24 years agoUsing seek=? used to cause part of the original file to be zero'ed, i
Glenn L McGrath [Sun, 10 Sep 2000 04:39:37 +0000 (04:39 -0000)]
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.

24 years agoMy previous attempt to make dd use fullRead, fullWrite was very broken,
Glenn L McGrath [Sun, 10 Sep 2000 01:54:27 +0000 (01:54 -0000)]
My previous attempt to make dd use fullRead, fullWrite was very broken,
this should actually work.

24 years agoremove some printf statements i forgot about
Glenn L McGrath [Sat, 9 Sep 2000 15:04:34 +0000 (15:04 -0000)]
remove some printf statements i forgot about

24 years agoUpdated to match new -R ar functionality
Glenn L McGrath [Sat, 9 Sep 2000 14:57:15 +0000 (14:57 -0000)]
Updated to match new -R ar functionality

24 years agoImplemented new ar functionality unique to busybox ar (i think), the -R
Glenn L McGrath [Sat, 9 Sep 2000 14:50:04 +0000 (14:50 -0000)]
Implemented new ar functionality unique to busybox ar (i think), the -R
option enable a Recursive extraction (or listing) to take place.

i.e. if any files being extracted are themselves ar archives then
busybox ar will extract their contents as well.

e.g. take bar.deb and do (with GNU ar) ar -q foo.deb b.ar
then with busybox ar can do ar -x b.ar data.tar.gz

-R isnt used for anything in GNU ar so i think it should be ok, could
have used long options

This functionality will become (more) usufull with tar, gz support.

24 years agoChanged getopt so that options can be grouped together, the source
Glenn L McGrath [Sat, 9 Sep 2000 13:38:26 +0000 (13:38 -0000)]
Changed getopt so that options can be grouped together, the source
archive is now assumed to be the first non parameter.

This is how GNU ar behaves.

24 years agoFix permisions
Glenn L McGrath [Sat, 9 Sep 2000 12:48:40 +0000 (12:48 -0000)]
Fix permisions

24 years agoNow supports GNU style long filenames.
Glenn L McGrath [Sat, 9 Sep 2000 08:35:45 +0000 (08:35 -0000)]
Now supports GNU style long filenames.

If no filenames are specifed to be (extracted/listed) it will act on
all files in the archive (i dont think the old version did this)

Code is structured to better support upcoming recursive extraction
functionality.

The old code was a bit strange in places, dont know what i was thinking.

24 years agoNew ls sorting patch, as written by Sterling Huxley, and then updated
Eric Andersen [Thu, 7 Sep 2000 17:24:47 +0000 (17:24 -0000)]
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

24 years agoStop leaking file handles.
Matt Kraai [Thu, 7 Sep 2000 04:34:17 +0000 (04:34 -0000)]
Stop leaking file handles.

24 years agoFix more typos.
Matt Kraai [Wed, 6 Sep 2000 03:59:49 +0000 (03:59 -0000)]
Fix more typos.

24 years agoReset optind so that getopt works in busybox applets called directly by sh.
Matt Kraai [Wed, 6 Sep 2000 01:46:18 +0000 (01:46 -0000)]
Reset optind so that getopt works in busybox applets called directly by sh.
Change the behavior of -c to correctly handle $1..$9.

24 years agoFixed a grammatical error.
Matt Kraai [Wed, 6 Sep 2000 00:50:51 +0000 (00:50 -0000)]
Fixed a grammatical error.

24 years agoFixed for when BB_CP_MV is enabled.
Eric Andersen [Tue, 5 Sep 2000 22:17:22 +0000 (22:17 -0000)]
Fixed for when BB_CP_MV is enabled.

24 years agoAdd BB_SH to get_last_path_component()... Fix thanks to
Eric Andersen [Tue, 5 Sep 2000 21:50:52 +0000 (21:50 -0000)]
Add BB_SH to get_last_path_component()...  Fix thanks to
Bj�rn Eriksson.

24 years agoApply segfault on no-args fix from robotti@metconnect.com
Eric Andersen [Tue, 5 Sep 2000 18:21:53 +0000 (18:21 -0000)]
Apply segfault on no-args fix from robotti@metconnect.com

24 years agoSet environment variable to make ash happy. ash is a frequent enough
Eric Andersen [Tue, 5 Sep 2000 17:57:52 +0000 (17:57 -0000)]
Set environment variable to make ash happy.  ash is a frequent enough
target....

24 years agoAdded expr, from Edward Betts <edward@debian.org>, with some fixups
Eric Andersen [Tue, 5 Sep 2000 17:37:48 +0000 (17:37 -0000)]
Added expr, from Edward Betts <edward@debian.org>, with some fixups
and docs added by me.
 -Erik

24 years agoAllow compilation when not using BB_FEATURE_TAR_EXCLUDE, and fix
Matt Kraai [Mon, 4 Sep 2000 16:51:55 +0000 (16:51 -0000)]
Allow compilation when not using BB_FEATURE_TAR_EXCLUDE, and fix
handling of --exclude option.

24 years agoForgot this part of wget
Eric Andersen [Mon, 4 Sep 2000 15:16:51 +0000 (15:16 -0000)]
Forgot this part of wget