1557626897
Make the extern NUM_APPLETS be a extern const NUM_APPLETS, to match the actual definition. -Erik
Eric Andersen
2001-06-24 06:09:14 +00:00
e0c0757d09
These were broken when using dmalloc due to include file ordering problems. busybox.h must be last. -Erik
Eric Andersen
2001-06-23 13:49:14 +00:00
d9c8acec37
Leave BB_FEATURE_NFSMOUNT disabled by default. -Erik
Eric Andersen
2001-06-22 15:48:19 +00:00
8f5b63edea
cpio applet, and changes to associated code
Glenn L McGrath
2001-06-22 09:22:06 +00:00
52a97ca00c
Some more cleanups. Of special importance, never free a pipe that still has running jobs. Instead, we ignore it and expect it to be cleaned by the background job stuff. -Erik
Eric Andersen
2001-06-22 06:49:26 +00:00
c798b07762
Some cleanups for hush. Saves about 350bytes. -Erik
Eric Andersen
2001-06-22 06:23:03 +00:00
a0105713e8
Remove obsolete function declaration.
Matt Kraai
2001-06-22 04:20:24 +00:00
764303f980
stdlib.h defined free(), which this needs
Eric Andersen
2001-06-22 03:07:19 +00:00
30f1eafaaa
Fix the build process so it does not do the evil #ifdef BB_FOO stuff. Build exactly one .o file per function, and let the linker throw away the junk it doesn't want. -Erik
Eric Andersen
2001-06-22 03:00:21 +00:00
6b03504441
Add in a missing header file
Eric Andersen
2001-06-22 02:58:45 +00:00
76ce7549ce
Dont change date or chmod on symlinks, lchown on symlinks if lchown available
Glenn L McGrath
2001-06-22 02:55:16 +00:00
9f832deecf
remove defines around unarchive, its always used
Glenn L McGrath
2001-06-22 02:27:55 +00:00
7387240ef0
heh
Tim Riker
2001-06-22 00:27:21 +00:00
837097648e
comment cleanup
Tim Riker
2001-06-22 00:27:11 +00:00
fbbd360b3c
create_path -> make_directory
Tim Riker
2001-06-22 00:14:20 +00:00
8071c02131
Add wget -P support, finishing off bug #1176 -Erik
Eric Andersen
2001-06-21 19:45:06 +00:00
ceeff73819
Rewrote mkdir (and touched lots of things in the process).
Matt Kraai
2001-06-21 19:41:37 +00:00
091781e20e
Support tar -C, per bug #1176 -Erik
Eric Andersen
2001-06-21 19:30:10 +00:00
8a646dd293
This commit guts lash, restoring it to what it was originally intended to do, just be a simple command line interpreter with basic pipe, redirect, and job control. For all the more fancy things, people should use hush or ash. -Erik
Eric Andersen
2001-06-21 16:38:11 +00:00
ea4abff595
Add in (and ignore) tar -p, since we preserver permissions automatically. closes bug #1185 -Erik
Eric Andersen
2001-06-21 15:17:59 +00:00
075228a461
Remove documentation of unsupported sed options.
Matt Kraai
2001-06-21 14:40:55 +00:00
02c40a72b8
Always apply commands with no specified range.
Matt Kraai
2001-06-21 13:57:51 +00:00
fa2661f2e5
Per a suggestion from Tom Oehser, fix up the leading-hyphen hack to make it general. Now all leading single hyphens are ignored for purposed of applet name matching, while argv[0] is still passed unaltered to applets, so leading-hyphen sensitive applets (such as sh) can react accordingly. -Erik
Eric Andersen
2001-06-21 04:56:24 +00:00
aff5e2eaef
it turs out, there was a nasty tar bug where bb tar would create leading dirs with mode 0777 in all cases due to usask issues. Thanks to Matt Kraai for noticing and spotting the culprit. This makes bb tar behave just like GNU tar once again. -Erik
Eric Andersen
2001-06-20 20:47:31 +00:00
06a71cced2
Initialise in_file to stdin, so it wont crash if no source specified
Glenn L McGrath
2001-06-20 08:07:34 +00:00
8e74bf94f3
Changed gz_open to ruturn a stream
Glenn L McGrath
2001-06-20 07:54:15 +00:00
eb1c94078f
Reorganise unarchiving functions, more code re-use, only does single pass(no more linked lists), basis for supporting a cpio (and cheaper untar) applet, but cpio applet isnt included in this. It effects ar, dpkg-deb applets only
Glenn L McGrath
2001-06-20 07:48:00 +00:00
b4a26e6fc0
For m68k, use __mc68000__ (not __m68k__ ), since that is what the various m68k compilers seem to actually use... -Erik
Eric Andersen
2001-06-19 15:00:52 +00:00
74c97cdba6
Changed a hard-coded path to a variable defined path.
Mark Whitley
2001-06-18 16:52:56 +00:00
32574a41b4
With a bit of care I was able to save about 100 bytes. -Erik
Eric Andersen
2001-06-15 20:10:39 +00:00
bd4b621e91
Applied patch from Jim Gleason that makes it so busybox will still work even if you rename it.
Mark Whitley
2001-06-15 16:54:25 +00:00
6bad1fa1fd
This isnt used anymore, replaced by seek_sub_file() in ./libbb/deb_extract.c
Glenn L McGrath
2001-06-15 03:13:00 +00:00
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
Eric Andersen
2001-06-13 08:02:45 +00:00
17822cd60a
Reorganise unarchive functions, new files, removed some
Glenn L McGrath
2001-06-13 07:34:03 +00:00
dab3d46b9d
A patch from Benjamin Zeckel <bzeckel@cisco.com> to allow nslookup.c to display the correct default nameservers.
Eric Andersen
2001-06-12 22:21:24 +00:00
583e3ca456
Add in Devil-Linux
Eric Andersen
2001-06-12 22:04:40 +00:00
7bd773c9fe
Only use a login shell when it will run on a console.
Matt Kraai
2001-06-12 20:55:02 +00:00
0915c4b985
- Fixed bug where you couldn't mix line number and regexes in two-address cmds - Fixed bug where you couldn't use two addresses for a 'c' cmd - Moved the do_sed_cmd function into process_file to simplify some things - Reduced a buncha lines of code in the process
Mark Whitley
2001-06-11 23:50:06 +00:00
bf0a010cf7
Copy files until EOF, not the reported file size, to deal with bad sizes in the proc filesystem.
Matt Kraai
2001-06-11 13:58:02 +00:00
5246225596
Add padding to struct sysinfo needed by m68k (note and patch by Richard Hirst).
Matt Kraai
2001-06-08 13:57:27 +00:00
04407e522b
Another hush update from Larry: Fixes the interaction between if/then/else/fi syntax and variables. I planned to do it right from the beginning, but my implementation was buggy. Also adds the relevant test cases. Also adds some old Matt Kraai variable test cases that got left out somehow.
Eric Andersen
2001-06-07 16:42:05 +00:00
4f3e24979b
Add the Linux Terminal Server Project
Eric Andersen
2001-06-06 18:21:25 +00:00
817e73cb63
A patch from Larry to fix pathological things like '>""'
Eric Andersen
2001-06-06 17:56:09 +00:00
12422ffe3e
Added a new testcase from Larry Doolittle (inspired by a note from Vadim Berkgaut).
Matt Kraai
2001-06-05 17:48:47 +00:00
c616e53ca2
Don't close file descriptors when we are duplicating them.
Matt Kraai
2001-06-05 16:50:08 +00:00
f4dd6e3d1a
Do not purge the .cvsignore files on 'make release' so that people can properly import into their own CVS trees. -Erik
Eric Andersen
2001-06-04 17:26:38 +00:00
cb2a372c9f
Revert the patch from Konstantin Boldyshev <konst@linuxassembly.org> to never change permissions on existing directories. This behavior is contrary to SUSv2 and contrary to GNU tar. Thanks to Matt Kraai for pointing this out. I should have been much more careful about accepting such a patch. -Erik
Eric Andersen
2001-06-04 16:54:39 +00:00
67a4640333
Loop forever instead of exiting.
Matt Kraai
2001-06-03 05:55:52 +00:00
62ebe2e443
Remove space between ar options
Glenn L McGrath
2001-06-03 05:41:59 +00:00
cda5cf1c2f
Correct ar options
Glenn L McGrath
2001-06-03 05:15:04 +00:00
9344f7575e
Don't whine about already mounted filesystems when invoked with -a.
Matt Kraai
2001-06-03 02:21:38 +00:00
8b113f93b9
Vladimir's last_patch13, containing several bugfixes.
Eric Andersen
2001-06-01 21:47:15 +00:00
4f6753e586
Cope gracefully when people type something, then hit ^C. -Erik
Eric Andersen
2001-05-31 17:17:12 +00:00
4f990533e3
Patch from Vladimir to fix up autocompletion on a files/dirs with spaces in them in the presence of a quoting. Also revert my signal handling patch, which seems to not solve the problem I thought it solved.
Eric Andersen
2001-05-31 17:15:57 +00:00
f12cc4ee68
Make hush the default shell. Ensure the applets_list gets the axe on a distclean.
Eric Andersen
2001-05-30 19:09:40 +00:00
86f0167e39
grep failed to compile when BB_FEATURE_CLEAN_UP was defined -- types were wrong.
Eric Andersen
2001-05-29 22:36:39 +00:00
6e9e136fcb
Use safe_strncpy.
Matt Kraai
2001-05-27 14:11:52 +00:00
4f6aea807b
More shell / quoting testcases from Larry.
Mark Whitley
2001-05-24 23:05:13 +00:00
8b7a0d807a
Some more patchelttes from Larry Doolittle.
Mark Whitley
2001-05-24 21:31:09 +00:00
0a4f578fdc
'Nother patch from Larry to fix a buglet in how the line gets sed-ified. Also, more testcases and comments on bugs and formatting differences in some of the testcases.
Mark Whitley
2001-05-24 21:24:39 +00:00
fa43e54b6f
Added support for grep -e and grep -f, closes bug #1164. Also added some testcases for these new features.
Mark Whitley
2001-05-24 18:36:18 +00:00
04052f96e1
Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid a bash2-ism and quote variables that contain strings.
Mark Whitley
2001-05-24 17:15:33 +00:00
a813afc24f
Plug another memory leak
Eric Andersen
2001-05-24 16:19:36 +00:00
5a9d441b2c
Fix up some signed char vs int issues that show up on powerpc.
Eric Andersen
2001-05-24 14:16:28 +00:00
1c1f5d3047
Get BB_LASH out of the list...
Eric Andersen
2001-05-24 14:11:09 +00:00
a15dc15f12
Plug another memory leak in hush. This one showed up when backticked commands were run. This one was sure a bugger to find. -Erik
Eric Andersen
2001-05-23 23:46:09 +00:00
bf7df04ec1
Fix a massive memory leak in the run_list_test() function. Rename run_list_test() as free_pipe_list(). Rename run_pipe_test() as free_pipe(). -Erik
Eric Andersen
2001-05-23 22:18:35 +00:00
77d9268892
Patch from larry to fix some grammar errors.
Eric Andersen
2001-05-23 20:32:09 +00:00
bdd4eced84
Commit a patch by Larry Doolittle which fixes recursive calls to file_peek, and improves some debugging messages.
Matt Kraai
2001-05-23 17:43:00 +00:00
774d135b66
Make more robust (patch by Larry Doolittle).
Matt Kraai
2001-05-23 14:45:09 +00:00
3200f5ac68
It turns out the descriptions of both dos2unix and unix2dos were broken. This fixes. -Erik
Eric Andersen
2001-05-22 22:39:10 +00:00
57e6a49e5b
Excellent. This patch from Larry fixes the behavior of hush when builtins are included in pipes.
Eric Andersen
2001-05-22 22:34:51 +00:00
9978576f15
Fix this case. No, really this time. unset FOO export FOO=bar FOO=baz echo "global env: " env | grep ^FOO echo "local env: " set | grep ^FOO -Erik
Eric Andersen
2001-05-22 21:37:48 +00:00
aeb44c4da6
Fix a race. Sometimes by the time we got to checkjobs(), the pipe struct had already been freed. Return immediately if the pipe is NULL.
Eric Andersen
2001-05-22 20:29:00 +00:00
816867858b
Oops. Remove some debug noise I left in.
Eric Andersen
2001-05-22 19:23:35 +00:00
94ac244dea
Updates from both Vladimir and Larry
Eric Andersen
2001-05-22 19:05:18 +00:00
1eb4acfc23
Fixed misnamed rewind command (noted by Tom Oehser).
Matt Kraai
2001-05-22 14:32:35 +00:00
edc806507c
Fixed extra -- lines (noted by Christophe Boyanique).
Matt Kraai
2001-05-22 14:29:27 +00:00
117231c44f
Make - read compressed data from stdin (thanks to Marius Groeger).
Matt Kraai
2001-05-22 14:23:02 +00:00
7f7348b7b2
Correctly remove leading slashes upon extraction (thanks to Marius Groeger).
Matt Kraai
2001-05-22 14:18:03 +00:00
1d9d41150b
Fixed mishandling of -c & -l options and accounted for case when we're grepping only one file.
Mark Whitley
2001-05-21 21:13:00 +00:00
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)
Eric Andersen
2001-05-21 20:30:51 +00:00
abec344ab7
A couple more minor touchups
Eric Andersen
2001-05-21 17:58:01 +00:00
317827d9e5
Several cleanups for usage messages
Eric Andersen
2001-05-21 17:50:53 +00:00
73991ff925
Fix tell support.
Matt Kraai
2001-05-21 17:01:32 +00:00
ada18ff0f5
The latest patch from Larry
Eric Andersen
2001-05-21 16:18:22 +00:00
8ae319a322
This patch from Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de> is based on the work of Jinux Kim on his "babobox" (derived from busybox-0.42), and enables kernel module loading and unloading for uClinux/m68k.
Eric Andersen
2001-05-21 16:09:18 +00:00
2f6e1f880b
Patch from Gernot Poerner <gp@it-netservice.de>. Adds in mount bind support.
Eric Andersen
2001-05-21 15:59:34 +00:00
13a70ac2ab
Fix open mode for IOCTLs which write to the tape.
Matt Kraai
2001-05-21 15:00:39 +00:00
9ffb7dd9a4
This is a patch from Vladimir:
Eric Andersen
2001-05-19 03:00:46 +00:00
6197c51834
Fix an escape problem in the docs. Some \n's didn't have the '\' escaped, and so were messsing the out output. -Erik
Eric Andersen
2001-05-18 23:14:53 +00:00
b6967635eb
(Almost) brand-new version of cut that supports muitiple lists of positions, per feature request from Tom Oehser.
Mark Whitley
2001-05-18 23:04:51 +00:00
1844770fec
Changed snprintf copies to use strncpy at the suggestion of Aaron Lehmann.
Matt Kraai
2001-05-18 21:24:58 +00:00
d6ef07406d
Rewrote copyfd to use library functions, terminate, and copy correct data.
Matt Kraai
2001-05-18 14:14:55 +00:00
6943815400
Fix applet_name.
Matt Kraai
2001-05-17 20:40:21 +00:00
231f998aba
Switch from hstrerror to herror for libc5 systems.
Matt Kraai
2001-05-17 14:19:05 +00:00
7cedac567c
Remove unused function. If necessary, we can use remove_file instead.
Matt Kraai
2001-05-17 04:03:22 +00:00
bc0f783a5f
Fix invocation of builtin shell to have proper argc and argv.
Matt Kraai
2001-05-17 03:54:37 +00:00
233817437d
Always print a newline after a matching substitution.
Matt Kraai
2001-05-17 01:02:58 +00:00