summaryrefslogtreecommitdiff
path: root/utility.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Forgot to commit these cleanups it seems.Eric Andersen2000-07-111-2/+0
| | | | -Erik
* Applied patch from Matt Kraai which does the following:Mark Whitley2000-07-111-0/+16
| | | | | | | - adds case-insensitive matching in sed s/// epxressions - consolodates common regcomp code in grep & sed into bb_regcomp and put in utility.c - cleans up a bunch of cruft
* Fixed NFS so it supports 2.4.x kernels and NFSv3. Should close bug #1009.Eric Andersen2000-07-101-0/+30
| | | | -Erik
* Comment on kernel stuffEric Andersen2000-07-101-2/+2
| | | | -Erik
* Remove yet more kernel header dependancies.Eric Andersen2000-07-101-2/+0
| | | | -Erik
* Put the GROWBY variable inside the get_line_from_file function, as that is theMark Whitley2000-07-101-1/+2
| | | | | only function where it's used and it's always good to keep the namespace clean. :-)
* From Matt Kraai <kraai@alumni.carnegiemellon.edu>:Eric Andersen2000-07-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a bug in get_line_from_file. If the length of the line is (GROWBY * n) +Eric Andersen2000-07-091-1/+1
| | | | | | GROWBY - 1, then it writes the null character just after the buffer. Yipe. Fix thanks to Matt Kraai <kraai@alumni.carnegiemellon.edu> Thanks Matt! -Erik
* Argh. More cross libc cleanup. Should be ok now...Eric Andersen2000-07-081-1/+16
| | | | -Erik
* Update files to reduce dependance on kernel version...Eric Andersen2000-07-081-5/+6
| | | | -Erik
* setkeycodes needs get_console_fd(), so if you disable chvt and deallocvt, butEric Andersen2000-07-061-3/+3
| | | | | | | | leave setkeycodes active, busybox will not link. Also fix a trivial use-before-initialize warning. Both fixes from Jon McClintock <jonm@bluemug.com>. -Erik
* Remove misguided klude around for 2.4.x-test* brokenness. Al ViroEric Andersen2000-07-051-3/+0
| | | | | will be removing this stuff from /proc/mounts real soon now I am assured. -Erik
* * Fix to tr so it recognizes standard escape sequences. Merged commonEric Andersen2000-07-051-0/+45
| | | | | | | 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
* Yanked out the cstring_alloc() and cstring_lineFromFile() functions fromMark Whitley2000-06-281-48/+27
| | | | | | | 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.
* Better cross libc support.Eric Andersen2000-06-281-0/+1
| | | | -Erik
* Updates to handle Linux 2.4.0 kernels (kludged around the "none" entries inEric Andersen2000-06-261-0/+12
| | | | | /proc/mounts, added a hack to make sysinfo work with both old and new kernels). -Erik
* + utility.cJohn Beppu2000-06-121-1/+1
| | | | | | | CSTRING_BUFFER_LENGTH = 1024 /* so it recurses less often */ + grep.c uses cstring_lineFromFile(), and doesn't ever say Line is too long, anymore
* Added a slightly modified version of Ron Alder's insmod patch.Eric Andersen2000-06-121-3/+3
| | | | | Very cool stuff. -Erik
* Fix /etc/passwd misspelling.Eric Andersen2000-06-021-1/+1
| | | | -Erik
* A number of additional fixed from Pavel Roskin, note some more bugs in theEric Andersen2000-06-021-3/+3
| | | | | | TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox, which is now included. -Erik
* More libc portability updates, add in the website (which has not beenErik Andersen2000-05-191-2/+3
| | | | | archived previously). Wrote 'which' during the meeting today. -Erik
* Some more portability updatesErik Andersen2000-05-171-10/+10
| | | | -Erik
* So much for my evil optimization. Doesn't seem to work. Will testErik Andersen2000-05-131-4/+63
| | | | | more on it later. -Erik
* Lots of updates. Finished implementing BB_FEATURE_TRIVIAL_HELPErik Andersen2000-05-121-66/+8
| | | | | | | | which lets you compile out most of the "--help" output, saving up to 17k. Renamed mnc to nc. -Erik
* * cp -fa now works as expected for symlinks (it didn't before)Erik Andersen2000-05-101-11/+9
| | | | | | * zcat works again (wasn't working since option parsing was broken) * more doc updates/more support for BB_FEATURE_SIMPLE_HELP -Erik
* Fix umount dependency on find_real_root_device_nameErik Andersen2000-05-081-1/+1
| | | | -Erik
* More stuffErik Andersen2000-05-021-9/+0
| | | | -Erik
* Some accrued fixes/updates.Erik Andersen2000-05-011-15/+42
| | | | | | | | * 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
* Latest and greatest. Some effort at libc5 (aiming towards newlib)Erik Andersen2000-04-281-7/+6
| | | | | compatability. -Erik
* Fix creation of /linuxrcErik Andersen2000-04-181-4/+6
| | | | -Erik
* Really fix the killall segfault this time.Erik Andersen2000-04-181-4/+5
| | | | -Erik
* Fix symlink following bug in chmod -R and friends. Allow SYSV styleErik Andersen2000-04-181-6/+11
| | | | | | | 'chown foo:bar' in addition to 'chown foo.bar', and fix a bug in the busybox globbing routine such that 'find /dir -name [i]' no longer segfaults. -Erik
* Fix stupid bug (wrong variable)Erik Andersen2000-04-181-5/+9
| | | | -Erik
* More little stuff.Erik Andersen2000-04-181-5/+25
| | | | -Erik
* Fix killallErik Andersen2000-04-181-1/+3
| | | | -Erik
* UpdatesErik Andersen2000-04-181-1/+2
| | | | -Erik
* + in the interest of robustness, I addedJohn Beppu2000-04-171-0/+51
| | | | | | | | 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.
* Patch to make killall actually kill all PIDs with the specified name,Erik Andersen2000-04-071-17/+22
| | | | | | | rather then busylooping trying to kill the first one until it dies. Should be more efficient now, and will only send one signal to each specified process. -Erik
* Tar now works perfectly. It behaves much better now then itErik Andersen2000-04-051-2/+2
| | | | | used to. Only thing left to do is add in exclude (-X) option. -Erik
* Yet another installment in the ongoing tar sagaErik Andersen2000-03-281-21/+11
| | | | -Erik
* The new tar for busybox is now done, and works just fineErik Andersen2000-03-241-3/+3
| | | | | for extracting files. Creation of tarballs is next... -Erik
* My latest ramblings.Erik Andersen2000-03-231-3/+3
| | | | -Erik
* Use the nice new find_real_root_device function to find theErik Andersen2000-03-221-10/+19
| | | | | | name of the root device, instead of having libc read whatever lies happen to be in /etc/mtab. -Erik
* Add in a nifty function for mount to use.Erik Andersen2000-03-221-0/+36
| | | | -Erik
* * all mallocs now use xmalloc (and so are OOM error safe), andErik Andersen2000-03-211-13/+5
| | | | | | the common error handling saves a few bytes. Thanks to Bob Tinsley <bob@earthrise.demon.co.uk> for the patch. -Erik
* Several fixes.Erik Andersen2000-03-171-3/+2
| | | | -Erik
* Major build system updates...Erik Andersen2000-03-161-2/+2
| | | | -Erik
* First pass at writing a shell for busybox.Erik Andersen2000-03-121-2/+2
| | | | | | | | | | Works fine, full job control support, etc. No syntax yet (if, then, while, etc). Handles pipes and & processes fine. TODO: add command editing, add syntax suport. -Erik
* Change BB_FEATURE_USE_DEVPS_N_DEVMTAB to the simpler0_43pre1Erik Andersen2000-03-081-7/+7
| | | | | BB_FEATURE_USE_DEVPS_PATCH. -Erik
* Fix bugs related to finding PIDs.Erik Andersen2000-03-071-9/+19
| | | | -Erik