aboutsummaryrefslogtreecommitdiff
path: root/utility.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove misguided klude around for 2.4.x-test* brokenness. Al Viroandersen2000-07-051-3/+0
| | | | | | | | will be removing this stuff from /proc/mounts real soon now I am assured. -Erik git-svn-id: svn://busybox.net/trunk/busybox@740 69ca8d6d-28ef-0310-b511-8ec308f3f277
* * Fix to tr so it recognizes standard escape sequences. Merged commonandersen2000-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 git-svn-id: svn://busybox.net/trunk/busybox@737 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Yanked out the cstring_alloc() and cstring_lineFromFile() functions frommarkw2000-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. git-svn-id: svn://busybox.net/trunk/busybox@722 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Better cross libc support.andersen2000-06-281-0/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@718 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Updates to handle Linux 2.4.0 kernels (kludged around the "none" entries inandersen2000-06-261-0/+12
| | | | | | | | /proc/mounts, added a hack to make sysinfo work with both old and new kernels). -Erik git-svn-id: svn://busybox.net/trunk/busybox@701 69ca8d6d-28ef-0310-b511-8ec308f3f277
* + utility.cbeppu2000-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 git-svn-id: svn://busybox.net/trunk/busybox@637 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Added a slightly modified version of Ron Alder's insmod patch.andersen2000-06-121-3/+3
| | | | | | | | Very cool stuff. -Erik git-svn-id: svn://busybox.net/trunk/busybox@636 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix /etc/passwd misspelling.andersen2000-06-021-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@599 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A number of additional fixed from Pavel Roskin, note some more bugs in theandersen2000-06-021-3/+3
| | | | | | | | | TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox, which is now included. -Erik git-svn-id: svn://busybox.net/trunk/busybox@594 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More libc portability updates, add in the website (which has not beenerik2000-05-191-2/+3
| | | | | | | | archived previously). Wrote 'which' during the meeting today. -Erik git-svn-id: svn://busybox.net/trunk/busybox@558 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some more portability updateserik2000-05-171-10/+10
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@556 69ca8d6d-28ef-0310-b511-8ec308f3f277
* So much for my evil optimization. Doesn't seem to work. Will testerik2000-05-131-4/+63
| | | | | | | | more on it later. -Erik git-svn-id: svn://busybox.net/trunk/busybox@534 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Lots of updates. Finished implementing BB_FEATURE_TRIVIAL_HELPerik2000-05-121-66/+8
| | | | | | | | | | | which lets you compile out most of the "--help" output, saving up to 17k. Renamed mnc to nc. -Erik git-svn-id: svn://busybox.net/trunk/busybox@532 69ca8d6d-28ef-0310-b511-8ec308f3f277
* * cp -fa now works as expected for symlinks (it didn't before)erik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@530 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix umount dependency on find_real_root_device_nameerik2000-05-081-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@524 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More stufferik2000-05-021-9/+0
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@515 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some accrued fixes/updates.erik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@507 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Latest and greatest. Some effort at libc5 (aiming towards newlib)erik2000-04-281-7/+6
| | | | | | | | compatability. -Erik git-svn-id: svn://busybox.net/trunk/busybox@499 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix creation of /linuxrcerik2000-04-181-4/+6
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@480 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Really fix the killall segfault this time.erik2000-04-181-4/+5
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@479 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix symlink following bug in chmod -R and friends. Allow SYSV styleerik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@478 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix stupid bug (wrong variable)erik2000-04-181-5/+9
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@477 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More little stuff.erik2000-04-181-5/+25
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@475 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix killallerik2000-04-181-1/+3
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@474 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Updateserik2000-04-181-1/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@472 69ca8d6d-28ef-0310-b511-8ec308f3f277
* + in the interest of robustness, I addedbeppu2000-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. git-svn-id: svn://busybox.net/trunk/busybox@463 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Patch to make killall actually kill all PIDs with the specified name,erik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@437 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Tar now works perfectly. It behaves much better now then iterik2000-04-051-2/+2
| | | | | | | | used to. Only thing left to do is add in exclude (-X) option. -Erik git-svn-id: svn://busybox.net/trunk/busybox@430 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Yet another installment in the ongoing tar sagaerik2000-03-281-21/+11
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@424 69ca8d6d-28ef-0310-b511-8ec308f3f277
* The new tar for busybox is now done, and works just fineerik2000-03-241-3/+3
| | | | | | | | for extracting files. Creation of tarballs is next... -Erik git-svn-id: svn://busybox.net/trunk/busybox@421 69ca8d6d-28ef-0310-b511-8ec308f3f277
* My latest ramblings.erik2000-03-231-3/+3
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@419 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use the nice new find_real_root_device function to find theerik2000-03-221-10/+19
| | | | | | | | | name of the root device, instead of having libc read whatever lies happen to be in /etc/mtab. -Erik git-svn-id: svn://busybox.net/trunk/busybox@418 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in a nifty function for mount to use.erik2000-03-221-0/+36
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@417 69ca8d6d-28ef-0310-b511-8ec308f3f277
* * all mallocs now use xmalloc (and so are OOM error safe), anderik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@416 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Several fixes.erik2000-03-171-3/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@409 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Major build system updates...erik2000-03-161-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@406 69ca8d6d-28ef-0310-b511-8ec308f3f277
* First pass at writing a shell for busybox.erik2000-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 git-svn-id: svn://busybox.net/trunk/busybox@403 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Change BB_FEATURE_USE_DEVPS_N_DEVMTAB to the simplererik2000-03-081-7/+7
| | | | | | | | BB_FEATURE_USE_DEVPS_PATCH. -Erik git-svn-id: svn://busybox.net/trunk/busybox@401 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix bugs related to finding PIDs.erik2000-03-071-9/+19
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@397 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix up some #define stuff to ensure the Right Thing(tm)erik2000-03-071-2/+2
| | | | | | | | | happens with all combinations of BB_KILL and BB_KILLALL being defined. -Erik git-svn-id: svn://busybox.net/trunk/busybox@396 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Wrote killall.erik2000-03-071-11/+90
| | | | | | | | | Adjusted mount, ps, utility.c, etc to handle my nifty new kernel patches the allow busybox to run perfectly without /proc. -Erik git-svn-id: svn://busybox.net/trunk/busybox@393 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add in freeramdisk.c, which (duh) frees ramdisks. If you have anyerik2000-03-041-2/+0
| | | | | | | | | ramdisks lying about and want to free up the memory they have used, this baby is the answar you have been waiting for. -Erik git-svn-id: svn://busybox.net/trunk/busybox@387 69ca8d6d-28ef-0310-b511-8ec308f3f277
* A few updates (including the cp fix the Craig has been looking for)erik2000-03-041-3/+77
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@386 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixed rebooting when init runs as /linuxrcerik2000-02-231-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@383 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Removed proc dependancies for init and free (which maintaining exactlyerik2000-02-211-10/+5
| | | | | | | | | | the same functionality). /proc takes up 90k of kernel space, so it is nice to avoid using it at all costs. The only places where it is depended on is for cetain optional mount/umount features, and for ps and lsmod. -Erik git-svn-id: svn://busybox.net/trunk/busybox@377 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Updateserik2000-02-111-15/+44
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@368 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixed the init problem where it wouldn't unmount filesystemserik2000-02-091-0/+14
| | | | | | | | on reboot. Also fixed swapoff -a so it works. -Erik git-svn-id: svn://busybox.net/trunk/busybox@358 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some formatting updates (ran the code through indent)erik2000-02-081-698/+696
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@357 69ca8d6d-28ef-0310-b511-8ec308f3f277
* mkdir -p had gotten broken. Fixed now.erik2000-02-081-1/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@356 69ca8d6d-28ef-0310-b511-8ec308f3f277
* device_open is common code -- moved into utility.cerik2000-02-071-0/+22
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@354 69ca8d6d-28ef-0310-b511-8ec308f3f277