Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | opt: Move some aggressive optimizations back to -O4 | Tavian Barnes | 2017-09-17 | 1 | -8/+1 |
| | |||||
* | opt: Separate optimization from parsing | Tavian Barnes | 2017-09-16 | 1 | -1/+4 |
| | |||||
* | eval: Make sure nopenfd >= 2 for bftw() | Tavian Barnes | 2017-09-09 | 1 | -6/+5 |
| | |||||
* | Try /proc/self/fd before /dev/fd | Tavian Barnes | 2017-09-09 | 1 | -3/+6 |
| | | | | On Solaris, /proc/self/fd is dynamic while /dev/fd is static. | ||||
* | util: Factor out checks for nonexistent paths/broken links | Tavian Barnes | 2017-09-06 | 1 | -2/+2 |
| | |||||
* | Implement -D search | Tavian Barnes | 2017-09-02 | 1 | -0/+100 |
| | |||||
* | Implement cost-based optimization | Tavian Barnes | 2017-08-27 | 1 | -13/+10 |
| | |||||
* | Avoid multiple extra stat()s of broken symlinks for -xtype | Tavian Barnes | 2017-08-22 | 1 | -4/+9 |
| | |||||
* | Unify broken symlink handling | Tavian Barnes | 2017-08-12 | 1 | -16/+6 |
| | | | | | | | | | 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. | ||||
* | util: Define O_DIRECTORY to 0 if it's not already defined | Tavian Barnes | 2017-07-29 | 1 | -5/+1 |
| | |||||
* | Re-license under the BSD Zero Clause License | Tavian Barnes | 2017-07-27 | 1 | -10/+15 |
| | |||||
* | Represent never returning as always_true && always_false | Tavian Barnes | 2017-07-21 | 1 | -3/+6 |
| | | | | | | | | | | Expressions that never return are vacuously always both true and false. Using this representation lets us take advantage of existing truth-based optimizations, which gets us optimizations of command lines like bfs -name foo -quit -print for free. | ||||
* | Implement -printx | Tavian Barnes | 2017-07-21 | 1 | -0/+38 |
| | | | | Also from NetBSD. | ||||
* | eval: Add some sanity checks | Tavian Barnes | 2017-07-20 | 1 | -0/+6 |
| | |||||
* | Implement -exit [STATUS] | Tavian Barnes | 2017-07-20 | 1 | -9/+19 |
| | | | | From NetBSD again. | ||||
* | Handle ENOTDIR the same as ENOENT | Tavian Barnes | 2017-07-09 | 1 | -2/+2 |
| | | | | | | For a/b/c, ENOTDIR is returned instead of ENOENT if a or b are not directories. Handle this uniformly when detecting broken symlinks, readdir races, etc. | ||||
* | Pass AT_EACCESS to faccessat() | Tavian Barnes | 2017-04-30 | 1 | -1/+1 |
| | | | | | That's the form that actually answers the expected question ("can I open() this"), and the only form Hurd supports. | ||||
* | Don't forget an access mode to openat() in -empty | Tavian Barnes | 2017-04-30 | 1 | -1/+1 |
| | |||||
* | Release 1.01.0 | Tavian Barnes | 2017-04-24 | 1 | -1/+1 |
| | |||||
* | Implement -fstype | Tavian Barnes | 2017-04-23 | 1 | -0/+14 |
| | | | | Fixes #6! | ||||
* | Implement -X | Tavian Barnes | 2017-04-16 | 1 | -0/+7 |
| | |||||
* | Implement -exec/-execdir ... + | Tavian Barnes | 2017-04-15 | 1 | -189/+15 |
| | |||||
* | Move bftw_typeflag converters to util.c | Tavian Barnes | 2017-04-08 | 1 | -1/+1 |
| | |||||
* | Color link targets for -ls | Tavian Barnes | 2017-03-16 | 1 | -7/+1 |
| | | | | Fixes #18. | ||||
* | Give struct expr a CFILE* instead of just a FILE* | Tavian Barnes | 2017-03-16 | 1 | -36/+14 |
| | | | | This unifies the behaviour of -print and -fprint /dev/stdout. | ||||
* | Implement -ls and -fls | Tavian Barnes | 2017-03-11 | 1 | -0/+105 |
| | |||||
* | Make a printf()-style API for colored messages | Tavian Barnes | 2017-03-11 | 1 | -9/+7 |
| | |||||
* | bftw: Make the nameoff of "///" point to "/" | Tavian Barnes | 2017-02-09 | 1 | -8/+3 |
| | | | | This simplifies a few things such as -name handling for ///. | ||||
* | Don't close stdin for -ok or -okdir | Tavian Barnes | 2017-02-09 | 1 | -9/+0 |
| | | | | Turns out it violates POSIX, even though GNU find does it. | ||||
* | Add support for -x?type with multiple types | Tavian Barnes | 2017-02-08 | 1 | -28/+2 |
| | | | | This functionality is already part of GNU findutils git. | ||||
* | Add some missing perror() calls | Tavian Barnes | 2017-02-07 | 1 | -20/+16 |
| | |||||
* | Make -quit happen immediately, not at the end of the current expression | Tavian Barnes | 2017-02-05 | 1 | -3/+31 |
| | |||||
* | Implement -printf/-fprintf | Tavian Barnes | 2017-02-05 | 1 | -30/+47 |
| | | | | | Based on a patch by Fangrui Song <i@maskray.me>. Closes #16. | ||||
* | Implement -nouser and -nogroup | Tavian Barnes | 2017-02-04 | 1 | -0/+26 |
| | |||||
* | Don't trust st_size when reading symlinks | Tavian Barnes | 2017-01-31 | 1 | -12/+1 |
| | | | | | Linux /proc, for example, reports a st_size of 0 for everything. It's nice to be able to use -lname on them anyway. | ||||
* | Simplify exec_chdir() | Tavian Barnes | 2017-01-14 | 1 | -16/+10 |
| | | | | | | The previous code recomputed the name offset for no reason, and had an embarrassing typo that was hypothetically a bug (`} if` instead of `} else if`). | ||||
* | eval: Check that O_DIRECTORY is defined before using it | Tavian Barnes | 2017-01-02 | 1 | -1/+5 |
| | |||||
* | Add tera and peta suffices for -size | Tavian Barnes | 2016-12-20 | 1 | -2/+4 |
| | |||||
* | Implement -sparse from FreeBSD find | Tavian Barnes | 2016-12-20 | 1 | -0/+13 |
| | |||||
* | Implement BSD find's -depth N | Tavian Barnes | 2016-12-18 | 1 | -0/+7 |
| | |||||
* | Implement -regex, -iregex, and -regextype/-E | Tavian Barnes | 2016-12-18 | 1 | -0/+33 |
| | |||||
* | Move portability code into util.h | Tavian Barnes | 2016-12-04 | 1 | -12/+0 |
| | |||||
* | Allow // to be different from / | Tavian Barnes | 2016-11-24 | 1 | -5/+4 |
| | | | | | | POSIX says that // may be resolved in an implementation-defined way (generally, to access network shares). So don't use it in tests, and don't canonicalize it to '/' in -execdir. | ||||
* | Don't pass AT_SYMLINK_NOFOLLOW to faccessat() | Tavian Barnes | 2016-11-22 | 1 | -1/+1 |
| | | | | It's an invalid flag for that call, and FreeBSD actually complains. | ||||
* | bftw: Make bftw_flags more similar to fts() options. | Tavian Barnes | 2016-11-21 | 1 | -2/+5 |
| | |||||
* | Fix -execdir for / | Tavian Barnes | 2016-11-21 | 1 | -5/+12 |
| | |||||
* | Fix -execdir for root paths with no slashes. | Tavian Barnes | 2016-11-21 | 1 | -1/+5 |
| | |||||
* | Check for readdir() errors everywhere. | Tavian Barnes | 2016-11-14 | 1 | -4/+16 |
| | |||||
* | Don't try to -delete the current directory. | Tavian Barnes | 2016-11-13 | 1 | -0/+5 |
| | |||||
* | Redirect stdin from /dev/null for -ok and -okdir. | Tavian Barnes | 2016-11-13 | 1 | -0/+10 |
| |