Commit Graph

95 Commits

Author SHA1 Message Date
Eric Andersen
77d9268892 Patch from larry to fix some grammar errors. 2001-05-23 20:32:09 +00:00
Matt Kraai
774d135b66 Make more robust (patch by Larry Doolittle). 2001-05-23 14:45:09 +00:00
Matt Kraai
d6ef07406d Rewrote copyfd to use library functions, terminate, and copy correct data. 2001-05-18 14:14:55 +00:00
Matt Kraai
231f998aba Switch from hstrerror to herror for libc5 systems. 2001-05-17 14:19:05 +00:00
Matt Kraai
8f7a4ad442 Add missing include, noted by Larry Doolittle. 2001-05-16 17:05:03 +00:00
Matt Kraai
c55b8d41c1 Add xgethostbyname and herror_msg* functions. 2001-05-16 15:40:51 +00:00
Eric Andersen
55f9872616 This patch from Adam Heath <doogie@debian.org>, makes print_file
(used by cat, grep, sed, etc) quite a bit faster.
2001-05-15 17:48: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
14d354312a Per suggestion from Vladimir, eliminate check_wildcard_match(), which
was only being used by insmod these days.

Also, I spent a minute adjusting insmod so that it first searches
/lib/modules/`uname -r` and then (if that fails) searches /lib/modules,
which makes bb insmod behave much more like the real insmod, and should
avoid nasty surprises (such as the recent "Modutils vs. Busybox..."
thread).
 -Erik
2001-05-14 17:07:32 +00:00
Eric Andersen
5f265b755a Fix a segfault in lash, hush, and cmdedit. Each of these used
xgetcwd, but did not check the return for a NULL, and then continued
to call strlen on the NULL when the cwd had been removed from under it.
 -Erik
2001-05-11 16:58:46 +00:00
Matt Kraai
f3e79ba6e3 Fix symlink removal problem noted by Erik Andersen. 2001-05-11 02:35:36 +00:00
Eric Andersen
8cd16d8fd3 This syncs things with Vladimir's latest patches. Also gets
rid of useless 'const int' declarations.
 -Erik
2001-05-07 23:11:23 +00:00
Eric Andersen
186bf1defc This is Vladimir's update to last_char_is(). Since 'char *' is
the least common denominator, I modified it to use that (not const),
which will minimize the need for casting elsewhere.
2001-05-07 23:10:16 +00:00
Eric Andersen
f3f9f3efa7 A patch from Vladimir to simplify chomp() 2001-05-07 23:02:39 +00:00
Eric Andersen
4ad13e5d95 A patch from Vladimir to simplify concat_path_file() and
make it less likely to break.
2001-05-07 23:01:32 +00:00
Eric Andersen
28355a36da Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,
make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
 -Erik
2001-05-07 17:48:28 +00:00
Glenn L McGrath
6b8c550d88 include libbb.h after other includes 2001-05-05 03:19:12 +00:00
Eric Andersen
044a72d0d5 Larry suggested using concat_path_file() would be an even safer bet
for 'which'.  I ageed, so I whipped this up -- which revealed a bug in
concat_path_file.  It turns out that that a '/' can be appended from
either the path _or_ the filename, but only the former was checked.
 -Erik
2001-05-04 22:04:24 +00:00
Eric Andersen
0e9aef36fa Oops. I was a bit too hasty and also changed applet_name. 2001-04-30 18:18:02 +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
6f34394454 These messages can be .rodata, so make them even more const.
-Erik
2001-04-30 18:08:03 +00:00
Matt Kraai
218aa370b4 Fix user permissions of copied directories. 2001-04-30 17:32:43 +00:00
Matt Kraai
43ca13714b Simplify permission handling for FIFOs. 2001-04-30 16:43:21 +00:00
Matt Kraai
24abecc349 Fix exit status when there is an error copying a file. 2001-04-30 16:37:04 +00:00
Matt Kraai
72ab975a6b Terminate source correctly when copying symlink. Report and patch by
Brian Webb <webbb@desertscenes.net>.
2001-04-27 15:40:27 +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
Mark Whitley
c29c44c00e libbb.h now includes ../busybox.h. This way, files in libbb that have
BB_[FEATURE] #defines won't be ignored. Credit to Magnus Damm for spotting
this.
2001-04-25 18:06:21 +00:00
Mark Whitley
4f3558af17 Fixed a BB_MTAB #define buglet reported by Magnus Damm. 2001-04-25 17:03:40 +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
Matt Kraai
01441036e9 Use generic flag names. 2001-04-24 01:30:02 +00:00
Matt Kraai
9ff9325e60 Move applet_name declaration from busybox.h to libbb.h. 2001-04-24 01:12:33 +00:00
Matt Kraai
91b2855ba8 Rewrite cp and mv to be SUSv2 compliant. 2001-04-23 18:53:07 +00:00
Mark Whitley
4e9267d76c Reversed last patch; unnecessary. 2001-04-23 17:56:27 +00:00
Mark Whitley
4b66dabc76 Added a sanity check to fix weird bug exposed when sourcing in commands from a
file with lash. Based on report from Heinz Walter.
2001-04-23 17:04:41 +00:00
Glenn L McGrath
f5c358bc98 Simplify file_prefix handling, and use of *dir variable. 2001-04-23 13:52:02 +00:00
Glenn L McGrath
ee0d93ed04 Fix horrible, horrible memmory leak. I wondered why processes were dying ! 2001-04-21 10:26:15 +00:00
Glenn L McGrath
89dc02d944 Clearly define out exclude list code, as recommended by Larry Doolittle 2001-04-21 02:12:13 +00:00
Glenn L McGrath
6ebd633829 Set permissions of created file 2001-04-20 05:16:38 +00:00
Eric Andersen
46cd74b9e3 This has two patches. First it moves interface.c to libbb (it is
support code after all).  It also contains a patch from Larry Doolittle
that removes two instances of "strlen([^)]*) *- *1", un-shadows two
variables, relaxes requirement for a sprintf(3) that returns number of
bytes written, and eliminates a duplicate subroutine.
2001-04-19 16:55:27 +00:00
Eric Andersen
0a3bda2c53 Move real_loop.h to libbb, where it belongs.
-Erik
2001-04-18 22:23:22 +00:00
Eric Andersen
b5ec61e4f5 Add types for the inline funcs, thanks to Ralph Siemsen <ralphs@netwinder.org> 2001-04-18 20:17:05 +00:00
Matt Kraai
b181056e06 Eliminated seeks so that we work correctly on pipes, and removed reliance on
undefined evaluation ordering.  Thanks to Anthony Towns for explanation and
solution.
2001-04-18 14:49:55 +00:00
Glenn L McGrath
33431ebb9a dpkg improvements, use full package struct, avoid extracting to tmp dir, rename variable.
deb_extract, untar and dpkg_deb modified to make the above possible
2001-04-16 04:52:19 +00:00
Glenn L McGrath
685f5fd6f4 untar changed to allow deb_extract to extract to memory, allows better operation of dpkg-deb -f 2001-04-15 12:51:59 +00:00
Glenn L McGrath
5faef74bae Reads a field from a debian control (status or available) file, handles multi-line fields. 2001-04-15 12:38:12 +00:00
Glenn L McGrath
65708e4cd1 Read a FILE* till an empty line or eof and return it as a char buffer.
In future maybe add char *end_str to interface to allow calling function
to specify end point.
2001-04-15 12:36:19 +00:00
Glenn L McGrath
445fb952b8 dpkg-deb -f and partial -I commands, adds 600 bytes 2001-04-13 04:02:57 +00:00
Matt Kraai
1e04ea388f Fix dos2unix/tr problem noted by Larry Doolittle. 2001-04-12 21:38:06 +00:00
Glenn L McGrath
5a65413c04 Updates, fixes for handling contents, verbose extract.
More updates to come
2001-04-12 16:40:21 +00:00