summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | spawn: New posix_spawn()-like API for execTavian Barnes2018-09-186-85/+243
|/
* exec: Don't leave zombies around if the child fails to exec()Tavian Barnes2018-09-121-10/+10
|
* exec: More fixes for bfs_exec_debug() changing errnoTavian Barnes2018-09-101-3/+4
|
* opt: Re-run optimizations after reordering expressionsTavian Barnes2018-08-184-25/+92
| | | | | This catches new data flow inferences that can be made after swapping the children of an expression.
* color: Fix a doc comment typoTavian Barnes2018-08-161-1/+1
|
* Add some missing fallthrough commentsTavian Barnes2018-08-162-0/+2
|
* util: Preserve errno in pipe_cloexec()Tavian Barnes2018-07-241-0/+2
|
* util: macOS doesn't have pipe2()Tavian Barnes2018-07-241-1/+2
| | | | | | | The code was testing for BSD, since all the normal BSDs have it. But until recently, <sys/param.h> wasn't included, so BSD was undefined even on platforms that define it. Now that it is defined appropriately, exclude macOS specifically.
* printf: Support all standard strftime() directivesTavian Barnes2018-07-241-10/+20
|
* printf: Support %B, GNU find's undocumented birth time specifierTavian Barnes2018-07-242-7/+8
|
* stat: Don't assume blocks are 512 bytesTavian Barnes2018-07-243-6/+24
| | | | | | | | | | | | POSIX says > The unit for the st_blocks member of the stat structure is not defined > within POSIX.1‐2008. and recommends using DEV_BSIZE from <sys/param.h> if available. Also, for -printf '%S', print 1 instead of NaN for empty files with no blocks.
* tests: Add tests for mode 000Tavian Barnes2018-07-205-0/+46
|
* printf: Output ? for errors in %YTavian Barnes2018-07-203-5/+35
|
* Release 1.2.31.2.3Tavian Barnes2018-07-153-2/+14
|
* eval: Debug all stat() callsTavian Barnes2018-07-151-47/+56
|
* eval: Share the statbuf across multiple -xtype'sTavian Barnes2018-07-121-18/+31
|
* eval: Get rid of duplicate statbuf fieldTavian Barnes2018-07-121-24/+22
| | | | | Also shorten eval_bfs_stat() to eval_stat(). Looks like this was leftover from an incomplete conversion a while ago.
* eval: Fix -delete when following symlinks.Tavian Barnes2018-07-123-2/+31
| | | | | Same bug as https://savannah.gnu.org/bugs/?46305. Please don't ever do this though.
* stat: Support the glibc statx() wrapperTavian Barnes2018-07-111-6/+18
| | | | | | | | | glibc 2.28 will ship with a wrapper for the statx() system call. Currently the build is broken against it, because sys/stat.h suddenly declares all the same types that linux/stat.h does. Fix it by taking the sys/stat.h ones if they exist. Fixes #35
* exec: Add some debugging info about failed commandsTavian Barnes2018-07-081-5/+19
|
* tests: Add some more tests for broken symlinksTavian Barnes2018-07-079-0/+55
|
* exec: Make ARG_MAX accounting a bit less restrictive with large pagesTavian Barnes2018-07-071-3/+6
| | | | | | | | | | | | | | | | | | | For Linux-style accounting, we really only need to handle a single page of wasted space due to rounding. Subtracting two pages for extra headroom was reasonable on systems with 4K pages, but overkill on systems like ppc64le with 64K pages. Worse yet was the fact that Alpine Linux only gives us 128K for arguments. Instead, only subtract a single page, plus the POSIX-recommended 2048 bytes. Credit to Mike Sullivan for the initial patch and testing on Alpine ppc64le. Fixes: http://build.alpinelinux.org/buildlogs/build-edge-ppc64le/testing/bfs/bfs-1.2.2-r0.log Co-authored-by: Mike Sullivan <mksully22@gmail.com>
* tests: Use -maxdepth 0 instead of | head -n1Tavian Barnes2018-07-071-1/+1
| | | | | | | This avoids the potential for "broken pipe" errors observed on some systems, e.g. http://build.alpinelinux.org/buildlogs/build-edge-s390x/testing/bfs/bfs-1.2.2-r0.log
* parse: Add some missing failure messagesTavian Barnes2018-07-061-0/+2
|
* stat: Handle platforms that don't support AT_EMPTY_PATH for fstatat()Tavian Barnes2018-07-021-3/+12
| | | | | | | | In particular, this caused -fprint to break on Hurd since AT_EMPTY_PATH is defined and works for some syscalls but not fstatat(). Should fix: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hurd-i386&ver=1.2.2-1&stamp=1529920401&raw=0
* stat: Don't try to statx() on architectures without the syscallTavian Barnes2018-07-021-2/+2
| | | | | | | | | | Turns out that ia64 and sh4 define all the structures and constants, but don't actually support the statx() system call itself. So instead of testing for the constants, just test for the syscall number directly. Should fix: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=ia64&ver=1.2.2-1&stamp=1529917943&raw=0 https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=sh4&ver=1.2.2-1&stamp=1529917893&raw=0
* exec: Don't assume bfs_exec_debug() doesn't change errnoTavian Barnes2018-06-251-4/+3
|
* bftw: Use bftw_action as the return type when applicableTavian Barnes2018-06-251-6/+8
|
* tests: Relax test_depth_errorTavian Barnes2018-06-242-5/+0
| | | | | Whether bfs can return children of a directory without search permission depends on whether d_type is filled in, which can't be guaranteed.
* Release 1.2.21.2.2Tavian Barnes2018-06-233-2/+16
|
* bftw: Introduce bftw_reader typeTavian Barnes2018-06-231-367/+336
|
* tests: New test for -depth in the presence of read errorsTavian Barnes2018-06-232-0/+22
|
* eval: Don't use %m to report a non-errno errorTavian Barnes2018-06-191-1/+1
| | | | Fixes: 2a45ad01e211d0b36056c21d5211be46195b273d
* parse: Don't leave expr->mode_cmp uninitializedTavian Barnes2018-06-181-1/+1
| | | | | | | | | When adding support for -perm +7777, I introduced an unconditional break that should have been conditional. The bug was observable with $ ./tests.sh --verbose --bfs="valgrind $PWD/bfs" test_perm_leading_plus_symbolic Fixes: 7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e
* bftw: Replace the circular buffer queue with a linked listTavian Barnes2018-04-071-91/+39
| | | | The performance is within 1% with much simpler code.
* README: Add a repology badgeTavian Barnes2018-04-051-3/+6
|
* tests: Work around broken rm in cleanupTavian Barnes2018-03-181-0/+7
| | | | | | | BusyBox rm, for example, doesn't handle long paths properly, so give it some help. C.f. http://lists.busybox.net/pipermail/busybox/2018-March/086302.html
* tests: Don't use process substitution for diffTavian Barnes2018-03-181-7/+18
| | | | | This frees up an extra FD for some diff implementations like openbox that need it when ulimit -n is low.
* tests: Be robust to ls -i implementation that output a leading spaceTavian Barnes2018-03-181-1/+1
|
* tests: Add a --noclean option to preserve the test directoryTavian Barnes2018-03-181-2/+14
| | | | Useful for debugging testsuite failures.
* New 'sanitized' make targetTavian Barnes2018-03-181-1/+4
|
* mtab: Fall back on /proc/mounts if /etc/mtab isn't availableTavian Barnes2018-03-041-0/+4
|
* exec: Fix size accounting when recovering from E2BIGTavian Barnes2018-02-101-4/+6
|
* Release 1.2.11.2.1Tavian Barnes2018-02-083-2/+10
|
* exec: Avoid a warning when building with _FORTIFY_SOURCETavian Barnes2018-02-061-1/+6
| | | | | Also, don't pass the address of errno itself to write(), since write() is allowed to modify it.
* eval: Don't unnecessarily zero fields in struct eval_stateTavian Barnes2018-02-011-7/+6
| | | | | | The designated initializer causes everything not mentioned to be zeroed, a waste of time that shows up on profiles. It also has the potential to hide uninitialized-use bugs.
* bftw: Open-code the "."/".." checksTavian Barnes2018-02-011-3/+4
| | | | | | GCC doesn't (yet) produce very fast code for strcmp() against constant strings (see https://gcc.gnu.org/PR78809), so hand-coding the comparison manually helps significantly.
* bftw: Fix the heap implementationTavian Barnes2018-02-011-1/+21
| | | | | | | | | | There were two problems: - bubble_down() would always bubble the entry all the way down the heap, instead of stopping at the appropriate place - remove() may need to bubble the replacement entry *up* the heap, if it came from a different subtree
* Release 1.21.2Tavian Barnes2018-01-203-2/+16
|
* printf: Add %w and %Wk for file birth timesTavian Barnes2018-01-205-1/+37
| | | | | %w and %W were chosen to match the format specifiers for file birth times from stat(1)