aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
AgeCommit message (Collapse)Author
2012-06-01Add xrealpath() at suggestion of Ashish Briggers.Rob Landley
2012-05-20dirtree logic cleanup: switch DIRTREE_NORECURSE and DIRTREE_NOSAVE to ↵Rob Landley
DIRTREE_RECURSE and DIRTREE_SAVE.
2012-04-14Rewrite dirtree so we don't need readdir, scandir, and fts.h. Rewrite ls ↵Rob Landley
(from scratch) to use new dirtree infrastructure. (This breaks everything else that currently uses dirtree.)
2012-03-19Add string to mode_t parserDaniel Walter
added new function string_to_mode(char *m_string, mode_t base) which parses a given string and converts it to a mode_t. If either + or - are part of m_string the permissions are either added or removed from base. Currently support for permision copy is missing (e.g. g=u), but all other flags should work. Format for m_string: either symbolic modes or octal representation. symbolic modes: [auog][[+-=][rwxst]*] examples: string_to_mode("u=rwx,g=rw,o=r", 0); string_to_mode("a-x", 0777); string_to_mode("0744", 0);
2012-03-12Redo tail to use optargs and optionally support lseek. Add support to ↵Rob Landley
optargs and llist.c, plus add a test suite entry. Still no -f support though.
2012-02-27Upgrade yesno() and make cp -i use it.Rob Landley
2012-02-26Factor out common code between killall/kill and move it to lib/lib.c, plus ↵Rob Landley
cleanups on kill.c.
2012-02-18And again, I forgot to check in a file. Oops.Rob Landley
2012-02-18Add killall by Andreas Heck, and factor out common pid code to lib.h.Rob Landley
2012-02-02Quick and dirty terminal_size() and yesno() functions, both of which need to ↵Rob Landley
be improved.
2012-02-02Commit 415 needs the other two files. (Oops.)Rob Landley
2011-12-12Forgot to check in loopfiles_rw changes needed by truncate.Rob Landley
2010-01-05Add TOYBOX_SUID.Rob Landley
2010-01-05Correct return types of xstrdup() and xstrndup()Rob Landley
2009-01-18Add mkswap.Rob Landley
2009-01-05Add -N, -I, -L, and -P options to cksum.Rob Landley
2009-01-03Check in crc_init needed by cksum. (Oops.)Rob Landley
2008-10-23Upgrade patch to detect hunks that start after a false start.Rob Landley
Imagine a hunk that starts with a blank line, but the site to patch starts with two blank lines. Before we'd read the first blank line, think it was the start of the hunk and buffer it, read the second blank line, notice that it didn't match the second line of the hunk, and discard _both_ buffered lines of context (writing them to the output file) without checking that one of the later context lines might have been the real start of the hunk. Make it re-check the rest of the buffered context for matches each time it discards a line of buffered context.
2008-07-18Tweak from Roberto Foglietta.Rob Landley
2008-07-03Add "tee" command.Rob Landley
2008-05-12Update mdev to work around the newest sysfs api breakage in the 2.6.25 kernel.Rob Landley
(Yeah, I know sysfs hasn't actually got an API, but I like to pretend...)
2008-04-13Teach get_rawline() to continue until a configurable char, and xstrndup()Rob Landley
shouldn't die when it's told to chop out a subsection of a string.
2008-02-21Make cp pass most of its test suite. Still need to add symlink support.Rob Landley
2008-02-20Add first pass at cp, totally untested, unlikely to work yet. :)Rob Landley
2008-01-20Move dlist_add() to lib/llist.cRob Landley
2007-12-27Make patch's file add actually work, including directory creating andRob Landley
understanding zero-context hunks.
2007-12-20Upgrade patch to understand creating and deleting files.Rob Landley
2007-12-18Patch command.Rob Landley
2007-12-15Start of "patch" support. Writes to stdout at the moment.Rob Landley
2007-11-29Add loopfiles() function, make catv use it.Rob Landley
2007-11-19Replace strlcpy() with xstrcpy(), which exits if the string won't fit.Rob Landley
2007-11-15Add noreturn mark to [p]error_exit(), suggested by Charlie Shepherd.Rob Landley
2007-10-11Promote help to global config option, teach error_exit() to output usage ↵Rob Landley
message when called from get_optflags().
2007-10-04Break out dirtree.c and let it call a function instead of returning the data.Rob Landley
2007-08-15More klibc fixes from Maximilian Attems, strlcpy() this time.Rob Landley
2007-06-18Add xputs() to detect EOF on writes.Rob Landley
2007-06-07Work around uClibc weirdness.Rob Landley
2007-04-29Add readlink, xreadlink(), and change xrealloc() to not fight the stupidRob Landley
compiler so much.
2007-02-16Add atolx() which understands extensions for kilobytes and megabytes and such.Rob Landley
2007-02-04Add parent pointer to dirtree, more work on mke2fs (populate dirtree, countRob Landley
index blocks).
2007-02-03Add xstat(), read_dirtree(), and read_dirtree_node().Rob Landley
2007-01-23More random progress on mke2fs. Nothing to see yet.Rob Landley
2007-01-20Add "echo". Has -n and -e (but not \0123 yet).Rob Landley
2007-01-18In bunzip replace setjmp/longjmp handling with error_exit(), replace stringRob Landley
based handling of a 6-byte header with with two 24-bit integer reads. Use xmalloc() and xzalloc().
2007-01-18Add fdprintf(). Remove reread() and rewrite() which handle -EINTR, whichRob Landley
shouldn't be a problem if we register signal handlers with sigaction(SA_RESTART) Straighten out count and len (I generally consistently use "count" for the current progress and "len" for the total, but this time I got them backwards for some reason and don't want to confuse myself in future.)
2007-01-14Add start of mke2fs/gene2fs, and some other stuff I've been working on.Rob Landley
2007-01-08xread() and xwrite() should take void *, not char *.Rob Landley
2007-01-08Add xaccess()Rob Landley
2007-01-08Add rewrite(), writeall(),and xwrite() to match the read versions.Rob Landley
2007-01-07xopen() wants 2 arguments unless you're creating a file, in which case youRob Landley
need 3. Doing varargs for this doesn't really appeal to me (bugs in waiting) so I made an xcreate() that takes 3 args, and had xopen() call it with 0 for the third argument. That way, if we feed O_CREAT to xopen() the permission 000 result should be easy to spot.