summaryrefslogtreecommitdiffstats
path: root/src/bftw.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-02-05 14:02:55 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-02-06 15:22:39 -0500
commit89ecb2a08467cd8aa6ba70f8519df494652cac96 (patch)
tree1095e93eb4e68bfc025a4aaa350f81bfd70544ba /src/bftw.h
parent10b6da04521cf3f65f3c47bece8e2e5e6e664d6d (diff)
downloadbfs-89ecb2a08467cd8aa6ba70f8519df494652cac96.tar.xz
bftw: stat() files asynchronously
Diffstat (limited to 'src/bftw.h')
-rw-r--r--src/bftw.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bftw.h b/src/bftw.h
index e325d14..2805361 100644
--- a/src/bftw.h
+++ b/src/bftw.h
@@ -26,12 +26,14 @@ enum bftw_visit {
* Cached bfs_stat() info for a file.
*/
struct bftw_stat {
- /** A pointer to the bfs_stat() buffer, if available. */
- const struct bfs_stat *buf;
- /** Storage for the bfs_stat() buffer, if needed. */
- struct bfs_stat storage;
- /** The cached error code, if any. */
- int error;
+ /** The bfs_stat(BFS_STAT_FOLLOW) buffer. */
+ const struct bfs_stat *stat_buf;
+ /** The bfs_stat(BFS_STAT_NOFOLLOW) buffer. */
+ const struct bfs_stat *lstat_buf;
+ /** The cached bfs_stat(BFS_STAT_FOLLOW) error. */
+ int stat_err;
+ /** The cached bfs_stat(BFS_STAT_NOFOLLOW) error. */
+ int lstat_err;
};
/**
@@ -62,10 +64,8 @@ struct BFTW {
/** Flags for bfs_stat(). */
enum bfs_stat_flags stat_flags;
- /** Cached bfs_stat() info for BFS_STAT_NOFOLLOW. */
- struct bftw_stat lstat_cache;
- /** Cached bfs_stat() info for BFS_STAT_FOLLOW. */
- struct bftw_stat stat_cache;
+ /** Cached bfs_stat() info. */
+ struct bftw_stat stat_bufs;
};
/**