Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-05-11 | Teach tar to extract type 'S' sparse file headers. | Rob Landley | |
2019-04-16 | Add argument to xflush() so it can test for stdout err without flushing. | Rob Landley | |
2019-04-02 | Don't leak stdout pipe filehandle into children. | Rob Landley | |
2019-04-02 | Have xflush() only flush stdout (that's all it checks errors on), | Rob Landley | |
and tweak a couple comments. | |||
2019-03-27 | xabspath: use O_PATH for dirfd. | Elliott Hughes | |
SELinux on Android is unhappy if you try to read "/": avc: denied { read } for name="/" dev="dm-3" ino=2 scontext=u:r:hal_dumpstate_impl:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 That could happen via the open of ".." too, and potentially any other directory might have similar restrictions, so move all of the open calls to using O_PATH. O_PATH seems more intention-revealing given what this function is doing anyway. | |||
2019-03-26 | xabspath: use O_PATH. | Elliott Hughes | |
SELinux on Android is unhappy if you try to read "/": avc: denied { read } for name="/" dev="dm-3" ino=2 scontext=u:r:hal_dumpstate_impl:s0 tcontext=u:object_r:rootfs:s0 tclass=dir permissive=0 O_PATH seems more intention-revealing anyway. | |||
2019-03-26 | Make touch use xparsedate() (result: -t and -d the same, autodetects format), | Rob Landley | |
and fix tests to pass on host too. | |||
2019-03-24 | Factor out xparsedate() and xvali_date() into lib. | Rob Landley | |
2019-03-17 | Fix xstrndup() bug. | Rob Landley | |
Now there's a second user... the libc function already null terminates at len+1, and it doesn't malloc the full size if strlen() smaller so the redundant termination stomped unallocated memory. Oops. sort.c never noticed because it calculated length to truncate or copy existing string, so never hit this. | |||
2019-03-10 | Add TOYFLAG_ARGFAIL() to allow argument parsing failures to exit with value. | Rob Landley | |
2019-03-10 | Make xsendfile() variants handle -1 length properly again. | Rob Landley | |
2019-03-10 | Don't redirect stderr or xexec() error hidden. | Rob Landley | |
2019-03-10 | Make multiple sendfile variants, and teach xpopen_both() to use existing | Rob Landley | |
stdin/stdout filehandles. | |||
2019-02-15 | Fix typos: e.g. change "cannonical" to "canonical". | Jason Spiro | |
2019-02-03 | William Djupström pointed out that xexec() lost the absolute path check. | Rob Landley | |
2019-01-08 | xchdir: show the specific failure. | Elliott Hughes | |
2018-12-23 | Add grep --color | Rob Landley | |
2018-12-14 | Add xrename() | Rob Landley | |
2018-10-21 | Make ./top -d .1234567890m work. | Rob Landley | |
2018-10-21 | Add % to lib/args.c (long time in milliseconds), add xmillitime(), redo | Rob Landley | |
xparsetime() not to need floating point, adjust callers. | |||
2018-10-10 | Trivial speedup to format_iso_time(), teach parsetime() leading garbage != 0. | Rob Landley | |
2018-10-10 | Add xsignal_flags() and more consistently use xsignal() instead of signal(). | Rob Landley | |
xsignal() wraps sigaction() giving control of SA_RESTART behavior and such. | |||
2018-09-16 | Nommu systems want to _exit() after vfork when exec fails, but should do ↵ | Rob Landley | |
cleanup ala fflush(0) after a normal exec() failure. | |||
2018-07-08 | Fix division by zero errors and double summary in ping. | Rob Landley | |
2018-05-06 | Support fractional seconds (and other time units) in `top -d`. | Elliott Hughes | |
LTP uses `top -d 0.1`, which isn't convincingly useful, but general support for other time units might be useful, and switching to xparsetime addresses both at once. Also fix 3169d948c049664bcf7216d4c4ae751881099d3e where I mistakenly treated `rev` and `toys.optflags&FLAG_b` as interchangeable. (Without this second fix, `top -b` looks fine but `top` is broken!) Also fix xparsetime to reject input such as "monkey" or "1monkey". | |||
2018-04-08 | Add readlink -m to show where a missing path would be. | Rob Landley | |
Note: ubuntu will show -m through a file, this treat that as error. | |||
2018-04-03 | Factor out xtempfile() | Rob Landley | |
2017-09-09 | Last commit used xstrtod(), forgot to check it in. | Rob Landley | |
2017-05-24 | Add and use xmmap. | Elliott Hughes | |
Everyone forgets that mmap returns MAP_FAILED rather than NULL on failure. Every use of mmap in toybox was either doing the wrong check, or no check at all (including the two I personally added). | |||
2017-02-04 | Posix says stdio.h should define 'stdout' as a macro, and bionic turns it into | Rob Landley | |
an array index, which doesn't work as a local variable name. So rename it. | |||
2017-02-04 | Switch oneit to use xopen_stdio() for -c (oops) and switch XVFORK() to use | Rob Landley | |
__attribute__((returns_twice)) instead of noinline. Yes LLVM supports it: https://llvm.org/bugs/show_bug.cgi?id=6287 | |||
2017-01-04 | Some lib fixes: mark xvfork() noinline, make xsendfile() return bytes copied, | Rob Landley | |
make xsocket()'s returned fd CLOEXEC. | |||
2016-09-05 | Export notstdio() wrapper. | Rob Landley | |
2016-09-04 | Add openro() and WARN_ONLY flag so xopen() and friends can warn without exiting. | Rob Landley | |
2016-08-18 | Change xgetpwnamid/xgetgrnamid to xgetuid/xgetgid returning the id number | Rob Landley | |
instead of a struct. This means it can return "12345" even if that user/group doesn't exist in /etc/passwd and similar. All the users were immediately dereferencing it to get pw_uid or gr_gid anyway, so just return it directly and adjust the users. This fixes things like "chown 12345:23456 filename". | |||
2016-08-04 | Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout, | Rob Landley | |
add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users. | |||
2016-06-30 | Use libbuf instead of stack buffer. | Rob Landley | |
2016-04-23 | Fix more to not append an extra newline. | Elliott Hughes | |
More's sigatexit handler needs to distinguish between normal exit and exit due to receipt of a signal. Change tty_sigreset to look at the signal number too, so that pressing 'q' to exit top doesn't cause its exit status to be 128. | |||
2016-03-13 | Split out _xexit() from xexit() and give sigatexit() multiple callbacks. | Rob Landley | |
2016-02-09 | Fix xpipe. (thinko.) | Rob Landley | |
2016-02-08 | Add xpipe() to lib. | Rob Landley | |
2016-01-28 | Bugfix I forgot to checkin, plus a wrapper function. | Rob Landley | |
2016-01-10 | Fix hwclock -u. | Elliott Hughes | |
You can't pass a NULL value to setenv(3). The "put things back how they were" intent of this code is best achieved by calling unsetenv(3) in the NULL case. (This causes a crash with "hwclock -u" on Android. glibc silently corrupts the environment instead.) | |||
2016-01-05 | Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format | Rob Landley | |
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts. | |||
2015-12-31 | Tweak error message. | Rob Landley | |
2015-10-27 | Replace xcount_cpus() with a call to sysconf(_SC_NPROCESSORS_CONF) | Rob Landley | |
2015-10-25 | Add xcount_cpus() | Rob Landley | |
2015-09-29 | Make defconfig build for nommu. | Rob Landley | |
Adds XVFORK() macro, teaches xpopen_both() to call /proc/self/exe with NULL argv (and converts cpio -p to use that), adds TOYBOX_FORK guards to some unconverted commands. | |||
2015-09-27 | Another chunk of nommu support, replacing toys.recursion with toys.stacktop. | Rob Landley | |
2015-08-06 | Adjust xexec() exit code to be 127, and tweaks for nommu friendliness. | Rob Landley | |