summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-10-27Release 1.1.41.1.4Tavian Barnes
2017-10-26exec: Make argument size tracking robust to page-granularity accountingTavian Barnes
From looking at the Linux exec() implementation, it seems a big part of the reason we needed extra headroom was that the arguments/environment are copied page-by-page, so even a small accounting difference could result in an error of an entire page size. Grow the headroom to two entire pages to account for this.
2017-10-22exec: Apply more headroom to avoid E2BIGTavian Barnes
I ran into "argument list too long" errors with a bfs -type f -exec grep pattern '{}' + command, despite the current accounting being pretty careful. Some experimentation showed that an additional 2048 bytes of headroom is always safe. While we're at it, explicitly account for the terminating NULL pointers in argv and environ.
2017-10-22Use "error:" prefix consistentlyTavian Barnes
2017-10-21cmdline: Declare functions in a more natural orderTavian Barnes
2017-10-21parse: Keep track of what files are already openTavian Barnes
Fixes #22
2017-10-21Report errors that occur when closing filesTavian Barnes
Otherwise we miss write errors that occur when flushing the cache.
2017-10-15Add a man pageTavian Barnes
Fixes #31
2017-10-13Don't use install -DTavian Barnes
-D isn't portable to non-GNU Unices, so just use mkdir manually. Fixes #28
2017-10-04Release 1.1.31.1.3Tavian Barnes
2017-09-20tests: -quit is not POSIXTavian Barnes
2017-09-20util: Wrap faccessat() to fix some portability issuesTavian Barnes
2017-09-17opt: More -O4 tweaksTavian Barnes
2017-09-17opt: Use the standard LLONG_MAX instead of the nonstandard LONG_LONG_MAXTavian Barnes
2017-09-17opt: Fix -depth with arguments bigger than INT_MAXTavian Barnes
2017-09-17opt: Move some aggressive optimizations back to -O4Tavian Barnes
2017-09-17parse: Document the bfs meaning of -O in -helpTavian Barnes
2017-09-17opt: Have data flow analysis respect always_{true,false}Tavian Barnes
2017-09-16tests: Add tests that trigger some optimizationsTavian Barnes
2017-09-16opt: Implement some data flow optimizationsTavian Barnes
2017-09-16opt: Separate optimization from parsingTavian Barnes
2017-09-10Release 1.1.21.1.2Tavian Barnes
2017-09-09eval: Make sure nopenfd >= 2 for bftw()Tavian Barnes
2017-09-09tests: Silence error messages while creating deep/Tavian Barnes
Some platforms will print errors like "cannot access parent directories: Result too large"
2017-09-09Try /proc/self/fd before /dev/fdTavian Barnes
On Solaris, /proc/self/fd is dynamic while /dev/fd is static.
2017-09-09mtab: Add support for SolarisTavian Barnes
2017-09-07Revert "tests: Test hardlinks to symlinks"Tavian Barnes
Apparently macOS doesn't support ln -P. This reverts commit 80eec18020f531abbdb2abbb919ab6c6fa34107c.
2017-09-06parse: Don't reorder or remove tests with potential side effectsTavian Barnes
-empty and -xtype may have side effects like reporting permission errors, which even affect the exit status of bfs. We shouldn't remove these effects without -Ofast.
2017-09-06util: Factor out checks for nonexistent paths/broken linksTavian Barnes
2017-09-06parse: Factor out common initialization code for -print and friendsTavian Barnes
2017-09-06tests: Test hardlinks to symlinksTavian Barnes
2017-09-04tests: Make test_deep pass with other find implementationsTavian Barnes
And move test_deep_strict to the bfs-specific tests, since it's not likely to ever pass for other implementations.
2017-09-02Implement -D searchTavian Barnes
2017-09-02tests: Use human-readable filenames in links/Tavian Barnes
2017-09-02mtab: Use __has_include() to check for <mntent.h>Tavian Barnes
This fixes the build against musl, as long as you have a new enough compiler for __has_include.
2017-08-27Implement cost-based optimizationTavian Barnes
2017-08-27printf: Save some lines in time specifier parsingTavian Barnes
2017-08-22Avoid multiple extra stat()s of broken symlinks for -xtypeTavian Barnes
2017-08-16tests: Remove unnecessary sort-args.sh invocationsTavian Barnes
2017-08-12tests: Add some syntax highlighting to --verboseTavian Barnes
2017-08-12Unify broken symlink handlingTavian Barnes
Rather than open-code the fallback logic for broken symlinks everywhere it's needed, introduce a new xfstatat() utility function that performs the fallback automatically. Using xfstatat() consistently fixes a few bugs, including cases where broken symlinks are given as arguments to predicates like -samefile.
2017-08-12tests: Add a test for -exec ... {} + with a failing commandTavian Barnes
2017-08-10Update README.mdTavian Barnes
2017-08-10bftw: Assert that the queue is empty when freeing itTavian Barnes
2017-08-10parse: Don't allow negative optimization levelsTavian Barnes
2017-08-10Release 1.1.11.1.1Tavian Barnes
2017-07-29exec: Fix more corner cases with -ok ... +Tavian Barnes
-ok should look for a ; even if it sees {} +, according to POSIX.
2017-07-29tests.sh: Add a --verbose modeTavian Barnes
2017-07-29exec: Don't allow anything between {} and +Tavian Barnes
POSIX explicitly forbids this extension: > Only a <plus-sign> that immediately follows an argument containing > only the two characters "{}" shall punctuate the end of the primary > expression. Other uses of the <plus-sign> shall not be treated as > special.
2017-07-29util: Define O_DIRECTORY to 0 if it's not already definedTavian Barnes