Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bftw: Pass a const struct BFTW * to the callback | Tavian Barnes | 2019-05-05 | 1 | -12/+12 |
| | |||||
* | bftw: Add a caching stat() API to struct BFTW | Tavian Barnes | 2019-05-04 | 1 | -134/+75 |
| | |||||
* | stat: Unify the flags arguments | Tavian Barnes | 2019-05-04 | 1 | -16/+12 |
| | |||||
* | Release 1.41.4 | Tavian Barnes | 2019-04-15 | 1 | -1/+1 |
| | |||||
* | eval: Fix -unique with -depth | Tavian Barnes | 2019-03-07 | 1 | -1/+1 |
| | |||||
* | bftw: Work around d_type being wrong for bind mounts on Linux | Tavian Barnes | 2019-03-06 | 1 | -7/+14 |
| | | | | | | C.f. https://savannah.gnu.org/bugs/?54913 C.f. https://lkml.org/lkml/2019/2/11/2027 Fixes https://github.com/tavianator/bfs/issues/37 | ||||
* | bftw: Switch from taking separate parameters to a parameters struct | Tavian Barnes | 2019-03-06 | 1 | -6/+18 |
| | |||||
* | parse: Use a trie to hold currently open files | Tavian Barnes | 2019-03-06 | 1 | -4/+2 |
| | |||||
* | trie: Revamp the API to support mappings | Tavian Barnes | 2019-03-04 | 1 | -5/+8 |
| | |||||
* | Implement -unique | Tavian Barnes | 2019-03-01 | 1 | -0/+43 |
| | | | | Closes #48 | ||||
* | Add some documentation comments | Tavian Barnes | 2019-02-09 | 1 | -0/+4 |
| | |||||
* | Fix -nouser/-nogroup error handling | Tavian Barnes | 2019-02-06 | 1 | -2/+20 |
| | | | | | | | | | | The proper way to check for nonexistent users/groups is to set errno to 0 before the get{grg,pwu}id() call, and check it afterwards. On doing this, it becomes obvious that the call can fail if bftw() is using all the available FDs, so give them some ephemeral FDs. It would be ideal to read the user/group table only once, but this fixes the bug for now. | ||||
* | eval: Fix wrong colors in error messages | Tavian Barnes | 2019-02-01 | 1 | -45/+72 |
| | | | | | When reporting an error, we should try to stat the file first so the message can have the right colors. | ||||
* | parse: Allow multiple comma-separated debug flags | Tavian Barnes | 2019-01-11 | 1 | -8/+10 |
| | |||||
* | posix1e: Split out ACL and capability handling from util | Tavian Barnes | 2019-01-02 | 1 | -0/+1 |
| | |||||
* | color: Check format strings + args for cfprintf() | Tavian Barnes | 2019-01-02 | 1 | -4/+5 |
| | | | | | | %{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings. | ||||
* | diag: Unify diagnostic formatting | Tavian Barnes | 2019-01-02 | 1 | -23/+40 |
| | | | | | | This adds a bfs: prefix to error/warning messages for consistency with other command line tools, and leaves only the "error:"/"warning:" part colored like GCC. It also uniformly adds full stops after messages. | ||||
* | stat: Provide a helper for getting human-readable field names | Tavian Barnes | 2018-12-25 | 1 | -23/+2 |
| | | | | And fix -newerXY if the Y time doesn't exist. | ||||
* | stat: Unify bfs_stat_time() implementations | Tavian Barnes | 2018-12-20 | 1 | -18/+8 |
| | |||||
* | stat: Handle statx() not returning some times | Tavian Barnes | 2018-12-19 | 1 | -12/+41 |
| | | | | | | /sys/fs/cgroup, for example, doesn't return access times from statx(). That shouldn't matter unless we actually need them, so make it not an error. | ||||
* | Implement -acl test | Tavian Barnes | 2018-12-17 | 1 | -0/+7 |
| | |||||
* | Add new -capable test | Tavian Barnes | 2018-12-17 | 1 | -0/+7 |
| | |||||
* | bftw: Move bftw_typeflag conversion out of util | Tavian Barnes | 2018-12-17 | 1 | -1/+1 |
| | | | | Turns out incomplete enum types are a GNU C extension. | ||||
* | Print device major/minor numbers for -ls | Tavian Barnes | 2018-11-01 | 1 | -3/+11 |
| | |||||
* | Update copyright dates | Tavian Barnes | 2018-09-24 | 1 | -1/+1 |
| | |||||
* | stat: Don't assume blocks are 512 bytes | Tavian Barnes | 2018-07-24 | 1 | -2/+2 |
| | | | | | | | | | | | | 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. | ||||
* | eval: Debug all stat() calls | Tavian Barnes | 2018-07-15 | 1 | -47/+56 |
| | |||||
* | eval: Share the statbuf across multiple -xtype's | Tavian Barnes | 2018-07-12 | 1 | -18/+31 |
| | |||||
* | eval: Get rid of duplicate statbuf field | Tavian Barnes | 2018-07-12 | 1 | -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 Barnes | 2018-07-12 | 1 | -2/+15 |
| | | | | | Same bug as https://savannah.gnu.org/bugs/?46305. Please don't ever do this though. | ||||
* | eval: Don't use %m to report a non-errno error | Tavian Barnes | 2018-06-19 | 1 | -1/+1 |
| | | | | Fixes: 2a45ad01e211d0b36056c21d5211be46195b273d | ||||
* | eval: Don't unnecessarily zero fields in struct eval_state | Tavian Barnes | 2018-02-01 | 1 | -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. | ||||
* | stat: New wrapper around the stat() family | Tavian Barnes | 2018-01-08 | 1 | -94/+82 |
| | | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. | ||||
* | Keep track of required FDs per-expr | Tavian Barnes | 2017-12-15 | 1 | -1/+3 |
| | |||||
* | color: Implement %m for cfprintf() | Tavian Barnes | 2017-11-13 | 1 | -4/+4 |
| | |||||
* | exec: Fix error reporting | Tavian Barnes | 2017-11-12 | 1 | -5/+9 |
| | |||||
* | cmdline: Account for files opened during/between evaluations more carefully | Tavian Barnes | 2017-11-12 | 1 | -2/+1 |
| | |||||
* | Add support for file birth/creation times on platforms that have it | Tavian Barnes | 2017-11-05 | 1 | -19/+37 |
| | | | | Fixes #19 | ||||
* | Use "error:" prefix consistently | Tavian Barnes | 2017-10-22 | 1 | -4/+4 |
| | |||||
* | util: Wrap faccessat() to fix some portability issues | Tavian Barnes | 2017-09-20 | 1 | -1/+1 |
| | |||||
* | 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 |
| |