aboutsummaryrefslogtreecommitdiff
path: root/utility.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Renamed "internal.h" to the more sensible "busybox.h".andersen2000-09-251-1/+1
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@1119 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Remove a now unneeded checkandersen2000-09-251-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1114 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix potential memory overrun...andersen2000-09-231-1/+1
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1104 69ca8d6d-28ef-0310-b511-8ec308f3f277
* More portable handling of loop header files, as done in util-linuxandersen2000-09-211-5/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1079 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix the halt/reboot/poweroff segfault when used from within an initrd...andersen2000-09-141-15/+3
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@1049 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fix calls to {m,c,re}alloc so that they use x{m,c,re}alloc instead ofkraai2000-09-131-8/+4
| | | | | | | segfaulting or handling errors the same way themselves. git-svn-id: svn://busybox.net/trunk/busybox@1039 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Extra defines for arbug12000-09-111-4/+4
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1033 69ca8d6d-28ef-0310-b511-8ec308f3f277
* New ls sorting patch, as written by Sterling Huxley, and then updatedandersen2000-09-071-1/+1
| | | | | | | | | by kent robotti. I then updated it to use my_getpwuid and my_getgrgid (per busybox policy). -Erik git-svn-id: svn://busybox.net/trunk/busybox@1017 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Fixed for when BB_CP_MV is enabled.andersen2000-09-051-2/+2
| | | | git-svn-id: svn://busybox.net/trunk/busybox@1012 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add BB_SH to get_last_path_component()... Fix thanks toandersen2000-09-051-1/+1
| | | | | | | Bj�rn Eriksson. git-svn-id: svn://busybox.net/trunk/busybox@1011 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Add an extra sanity check in parse_modeandersen2000-09-011-0/+3
| | | | | | | -Erik git-svn-id: svn://busybox.net/trunk/busybox@989 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Removed dead regular expression code.kraai2000-08-281-76/+0
| | | | git-svn-id: svn://busybox.net/trunk/busybox@985 69ca8d6d-28ef-0310-b511-8ec308f3f277
* Compile xstrdup and xstrndup iff they are needed.kraai2000-08-261-1/+3
| | | | git-svn-id: svn://busybox.net/trunk/busybox@984 69ca8d6d-28ef-0310-b511-8ec308f3f277
* ar.c now uses a linked list to process headers, uses getopt, new internal ↵bug12000-08-251-15/+30
| | | | | | | | | | | | | function extractAr(srcFD, dstFd, filename) to make it easily accessable to other busybox functions. moved copySubFile from ar.c to utilities.c modified dd.c to use fullWrite modified copyFile in utilities.c to use copySubFile git-svn-id: svn://busybox.net/trunk/busybox@983 69ca8d6d-28ef-0310-b511-8ec308f3f277
* 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