summaryrefslogtreecommitdiffstats
path: root/eval.c
AgeCommit message (Collapse)Author
2020-01-07Update copyright datesTavian Barnes
2020-01-07eval: For -ls, print a + if a file has ACLsTavian Barnes
2019-08-29darray: New dynamic array libraryTavian Barnes
2019-07-04Make -mount and -xdev do different thingsTavian Barnes
POSIX now says -mount should skip the whole mount point, while -xdev should only skip its descendents. C.f. http://austingroupbugs.net/view.php?id=1133 C.f. https://savannah.gnu.org/bugs/?42318 C.f. https://savannah.gnu.org/bugs/?54745
2019-06-25bftw: Remove BFTW_SKIP_SIBLINGSTavian Barnes
It's not used by bfs, and it's difficult to support in all search strategies.
2019-06-25util: Filter out . and .. in xreaddir()Tavian Barnes
2019-06-16eval: Get rid of a level of indirection for quitTavian Barnes
2019-05-29Implement an iterative deepening mode (-ids)Tavian Barnes
2019-05-28Implement a depth-first mode (-dfs)Tavian Barnes
2019-05-28bftw: Visit multiple roots breadth-firstTavian Barnes
This makes `bfs a b` treat `a` and `b` as siblings.
2019-05-24Implement -xattr predicateTavian Barnes
2019-05-24fsade: Refactor the POSIX.1e abstractionsTavian Barnes
Since we're going to want to abstract more things that aren't part of POSIX.1e (like xattrs) in a similar way, let's give this a more generic name. And while we're at it, give it some more precise error reporting, and add some tests.
2019-05-05color: Don't stat() if we don't need toTavian Barnes
2019-05-05bftw: Pass a const struct BFTW * to the callbackTavian Barnes
2019-05-04bftw: Add a caching stat() API to struct BFTWTavian Barnes
2019-05-04stat: Unify the flags argumentsTavian Barnes
2019-04-15Release 1.41.4Tavian Barnes
2019-03-07eval: Fix -unique with -depthTavian Barnes
2019-03-06bftw: Work around d_type being wrong for bind mounts on LinuxTavian Barnes
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
2019-03-06bftw: Switch from taking separate parameters to a parameters structTavian Barnes
2019-03-06parse: Use a trie to hold currently open filesTavian Barnes
2019-03-04trie: Revamp the API to support mappingsTavian Barnes
2019-03-01Implement -uniqueTavian Barnes
Closes #48
2019-02-09Add some documentation commentsTavian Barnes
2019-02-06Fix -nouser/-nogroup error handlingTavian Barnes
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.
2019-02-01eval: Fix wrong colors in error messagesTavian Barnes
When reporting an error, we should try to stat the file first so the message can have the right colors.
2019-01-11parse: Allow multiple comma-separated debug flagsTavian Barnes
2019-01-02posix1e: Split out ACL and capability handling from utilTavian Barnes
2019-01-02color: Check format strings + args for cfprintf()Tavian Barnes
%{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.
2019-01-02diag: Unify diagnostic formattingTavian Barnes
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.
2018-12-25stat: Provide a helper for getting human-readable field namesTavian Barnes
And fix -newerXY if the Y time doesn't exist.
2018-12-20stat: Unify bfs_stat_time() implementationsTavian Barnes
2018-12-19stat: Handle statx() not returning some timesTavian Barnes
/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.
2018-12-17Implement -acl testTavian Barnes
2018-12-17Add new -capable testTavian Barnes
2018-12-17bftw: Move bftw_typeflag conversion out of utilTavian Barnes
Turns out incomplete enum types are a GNU C extension.
2018-11-01Print device major/minor numbers for -lsTavian Barnes
2018-09-24Update copyright datesTavian Barnes
2018-07-24stat: Don't assume blocks are 512 bytesTavian Barnes
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.
2018-07-15eval: Debug all stat() callsTavian Barnes
2018-07-12eval: Share the statbuf across multiple -xtype'sTavian Barnes
2018-07-12eval: Get rid of duplicate statbuf fieldTavian Barnes
Also shorten eval_bfs_stat() to eval_stat(). Looks like this was leftover from an incomplete conversion a while ago.
2018-07-12eval: Fix -delete when following symlinks.Tavian Barnes
Same bug as https://savannah.gnu.org/bugs/?46305. Please don't ever do this though.
2018-06-19eval: Don't use %m to report a non-errno errorTavian Barnes
Fixes: 2a45ad01e211d0b36056c21d5211be46195b273d
2018-02-01eval: Don't unnecessarily zero fields in struct eval_stateTavian Barnes
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.
2018-01-08stat: New wrapper around the stat() familyTavian Barnes
This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.
2017-12-15Keep track of required FDs per-exprTavian Barnes
2017-11-13color: Implement %m for cfprintf()Tavian Barnes
2017-11-12exec: Fix error reportingTavian Barnes
2017-11-12cmdline: Account for files opened during/between evaluations more carefullyTavian Barnes