aboutsummaryrefslogtreecommitdiff
path: root/utility.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Yet another patch to fixup lsmodandersen2000-08-211-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@961 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some leftover stuff I forgot to commit for the lsmod change.andersen2000-08-211-0/+7
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@960 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Added fix from David Vrabel <dvrabel@arcom.co.uk> for aandersen2000-08-111-1/+1
| | | | | | | | buffer overrun in find_real_root_device(), fixing bug #1019 -Erik git-svn-id: svn://busybox.net/trunk/busybox@951 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Some #include updates.andersen2000-08-101-1/+0
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@946 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Merge in two patches from Dave Cinege:andersen2000-08-021-4/+4
| | | | | | | | | | | | | the first is a cleanup of tar --exclude the second changes mount so mtab works more as it should, and also allows mount to use the traditional short form (i.e. 'mount / -o remount,rw' now works. While inside tar, I changed it to use getopt... -Erik git-svn-id: svn://busybox.net/trunk/busybox@937 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix bug 1017, which reports that insmod segfaults when /lib/modules doesn'tkraai2000-08-011-1/+1
| | | | | | | exist. Also allow early search termination (per the comments). git-svn-id: svn://busybox.net/trunk/busybox@931 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More sh updates (with related changes to everything else). Switchedandersen2000-07-281-1/+9
| | | | | | | | | to using getopt and cleaned up the resulting mess. if-then-else-fi is now basically working (given a bunch of constraints). -Erik git-svn-id: svn://busybox.net/trunk/busybox@913 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Moved some code and add a coupld #defines to support use of dmalloc.andersen2000-07-191-3/+15
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@878 69ca8d6d-28ef-0310-b511-8ec308f3f277
* New message added to messages.c: full_versionproski2000-07-171-2/+2
| | | | | | | Used where possible git-svn-id: svn://busybox.net/trunk/busybox@871 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Moved functions used by "lsmod" from cat.c to utility.cproski2000-07-171-4/+27
| | | | | | | | Adjusted to make lsmod and sh compilable as standalone apps. Comment fixes git-svn-id: svn://busybox.net/trunk/busybox@870 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Now it's possible to compile Busybox with only one app definedproski2000-07-171-11/+20
| | | | | | | (unless it's lsmod, to be fixed by the next commit) git-svn-id: svn://busybox.net/trunk/busybox@868 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More cleanups.andersen2000-07-141-9/+9
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@853 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Use errorMsg rather than fprintf.kraai2000-07-141-4/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@848 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Changed bb_regcomp to xregcomp and #if 0'ed out destroy_cmd_strs in sed.cmarkw2000-07-121-5/+2
| | | | | | | (maybe I'll remove it later). git-svn-id: svn://busybox.net/trunk/busybox@833 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Always report the applet name when doing error reporting.kraai2000-07-121-4/+6
| | | | git-svn-id: svn://busybox.net/trunk/busybox@831 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Forgot to commit these cleanups it seems.andersen2000-07-111-2/+0
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@819 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Applied patch from Matt Kraai which does the following:markw2000-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 git-svn-id: svn://busybox.net/trunk/busybox@812 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixed NFS so it supports 2.4.x kernels and NFSv3. Should close bug #1009.andersen2000-07-101-0/+30
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@810 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Comment on kernel stuffandersen2000-07-101-2/+2
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@807 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove yet more kernel header dependancies.andersen2000-07-101-2/+0
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@804 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Put the GROWBY variable inside the get_line_from_file function, as that is themarkw2000-07-101-1/+2
| | | | | | | | only function where it's used and it's always good to keep the namespace clean. :-) git-svn-id: svn://busybox.net/trunk/busybox@801 69ca8d6d-28ef-0310-b511-8ec308f3f277
* From Matt Kraai <kraai@alumni.carnegiemellon.edu>: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 git-svn-id: svn://busybox.net/trunk/busybox@798 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix a bug in get_line_from_file. If the length of the line is (GROWBY * n) +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 git-svn-id: svn://busybox.net/trunk/busybox@786 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Argh. More cross libc cleanup. Should be ok now...andersen2000-07-081-1/+16
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@781 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Update files to reduce dependance on kernel version...andersen2000-07-081-5/+6
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@779 69ca8d6d-28ef-0310-b511-8ec308f3f277
* setkeycodes needs get_console_fd(), so if you disable chvt and deallocvt, butandersen2000-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 git-svn-id: svn://busybox.net/trunk/busybox@752 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 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