aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2013-11-07Tweak terminal_size to never set either to 0, and return true/false whether ↵Rob Landley
it could determine at least one coordinate. (If you set $COLUMNS but not $ROWS, we assume you're happy with the 80x25 default for the other.)
2013-11-03Fix off by one, pointed out by Ashwini Sharma.Rob Landley
2013-11-02Give xstrncpy() a more informative error message.Rob Landley
2013-11-02Merge toynet.h into toys.h: musl supports it and micromanaging uClibc config ↵Rob Landley
options isn't very interesting anymore.
2013-10-27Refactor terminal querying.Rob Landley
2013-10-16Minor lib/password.c cleanup, described on the list. (Inline two functions.)Rob Landley
2013-10-16Prep work for useradd by Ashwini Sharma.Rob Landley
2013-10-06Whitespace tweaks and remove unused variable.Rob Landley
2013-10-06It's not a problem to exactly fill up the buffer with a run if the next ↵Rob Landley
symbol is the terminating symbol. Fixes https://jira.cyanogenmod.org/browse/CYAN-1896
2013-09-21Tweak args (yank old + that never worked, rename | to +), and add uname -o ↵Rob Landley
as a synonym for -s.
2013-09-21Fluff out option parsing documentation, add another DEBUG test.Rob Landley
2013-09-16Fix -t c0 and -J as reported by heehooman at gmail on the list.Rob Landley
Also fix up help text, and hook up -c.
2013-09-11Ah, that's why commit 1057 was skipped last pull: it was unfinished. Oops. ↵0.4.6Rob Landley
(Fix it.)
2013-09-10Remove two unused functions and shrink another.Rob Landley
2013-09-09Adjust patch to use dlist_pop()Rob Landley
2013-09-09Redo tail closer to the original design. Add more tests for large data sets. ↵Rob Landley
(Still no -f support yet.)
2013-09-09Fix [-group] argument dropping.Rob Landley
2013-09-03Replace ↵Rob Landley
for_each_pid_with_name_in_array_perform_callback_function_upon_translated_value() with name_to_pid(), comparing absolute paths or just basename() consistently as spotted by Lukasz Skalski, and adjust callers.
2013-09-06Ashwini Sharma submitted route.c, adding it to pending.Rob Landley
2013-09-06Make [-abc] exclude logic clear argument slots when disabling options.Rob Landley
2013-09-06Fix for xpidfile spotted by Felix Janda.Rob Landley
2013-09-03Introduce libbuf analogous to toybuf but for use by lib/*.c. Change ↵Rob Landley
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
2013-09-03Remove itoa/utoa, let libc do this with sprintf.Rob Landley
2013-09-01Improve --longopt parsing: general bugfixes, better error reporting, new ; ↵Rob Landley
option for optional arguments only suppliable with =.
2013-08-30Allow getmountlist to read fstab too.Rob Landley
2013-08-30Add scripts/single.sh to build individual non-multiplexed standalone commands.Rob Landley
Alas, you can't quite do this yet: make defconfig make for i in $(./toybox) do echo $i PREFIX=singles/ scripts/single.sh $i || break done Because the OLDTOY() aliases for commands won't build without the base command. And I can't just skip them because chown/chmod or mv/cp aren't the same thing.
2013-08-27Rewrite pmap to be simpler and match other implementation's output more closely.Rob Landley
2013-08-26syslogd: cleanupFelix Janda
- fix bugs introduced in the cleanups - inline addrfds() and open_unix_socks() and simplify them - use xpidfile() - remove isNetwork from struct logfile - invert the meaning of facility and level in struct logfile so that they are automatically correctly initialized - fix memory leak regarding the filenames of logfiles - TT.sd was unused
2013-08-18Remove files du no longer needs.Rob Landley
2013-08-10Add daemonize function to lib for klogd and syslogdFelix Janda
2013-08-08Achille Fouilleul pointed out that fdlength wasn't returning the right ↵Rob Landley
length in the binary search case. (This code was originally written for mke2fs, and applies to block devices. The regular file case should just return the length from stat. The ioctl is left commented out in case I want to add back code to check the size of CDROMs without spinning them up again; not sure the sector size is always right these days.)
2013-08-07Forgot to check in xfdopen(). My bad.Rob Landley
Failure of fdopen() is most likely failure of malloc() for the FILE structure.
2013-07-31Cleanup renice and implement '|' (required option) in argument parsing.Rob Landley
2013-07-19Start of TOYBOX_SINGLE support, for building standalone commands with no ↵Rob Landley
multiplexer.
2013-07-17Add timeout, factoring out common code from sleep.Rob Landley
2013-07-16Split lib/xwrap.c from lib/lib.cRob Landley
2013-07-14New stuff added to lib.c needs review too, so make a lib/pending.c and move ↵Rob Landley
several functions to it.
2013-07-12add grepStrake
2013-07-06This inlines CRC64, and nothing more.Isaac Dunham
The functions involved were called only once.
2013-06-22Option type @ counts number of occurrences, it doesn't take an argument.Rob Landley
2013-06-16Add xexit() and make error_exit() use it.Rob Landley
2013-06-02Stat cleanup.Rob Landley
lib: rename format_mode() to mode_to_string() (echoing string_to_mode), make it take a normal char * argument. stat: collapse big switch/case statements that only have one line each into if/else staircase (much fewer lines of code). Remove return type (other stat implementations print ? for unknown escapes, so do that here). Inline do_stat() and do_statfs(). Set default string in normal local variable "format". Remove unnecessary struct d. Restructure stat logic to "if (flagf && !statfs()) else if (!flagf && !stat()) else perror_msg();" Teach %N to add -> symlink. Judicious use of putchar() instead of xputc to let FILE * do its job collating output.
2013-06-01Add peek/poke to header file.Rob Landley
2013-06-01Enable readfile() and add peek() and poke() functions.Rob Landley
2013-05-19xioctl() error message should use hex ioctl number; that's what headers list.Rob Landley
2013-05-14Silence warning and comment a subtle bit.Rob Landley
2013-05-10Convert getmountlist() to xgetmountlist().Rob Landley
2013-04-30Fix bare longopts to set unique optflag bits.Rob Landley
2013-04-29Fix xabspath when last path component exists but we haven't got permissions ↵Rob Landley
to open it (ala readlink -f /dev/sda as a normal user). Spotted by Ashwini Sharma.
2013-04-29Fix conflicting types for show_help().Rob Landley