diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-03-06 22:25:56 -0800 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-03-06 22:25:56 -0800 |
commit | b1d0e0e97ce747534a945a6fe0c3a15ccd8dbf00 (patch) | |
tree | 57b2f054611114783e7499996e730611691f94ff /stat.h | |
parent | d4a4ef26ef5245813ed74847147ce7f58c5a5232 (diff) | |
download | bfs-b1d0e0e97ce747534a945a6fe0c3a15ccd8dbf00.tar.xz |
parse: Use a trie to hold currently open files
Diffstat (limited to 'stat.h')
-rw-r--r-- | stat.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -126,4 +126,14 @@ int bfs_fstat(int fd, struct bfs_stat *buf); */ const struct timespec *bfs_stat_time(const struct bfs_stat *buf, enum bfs_stat_field field); +/** + * A unique ID for a file. + */ +typedef unsigned char bfs_file_id[sizeof(dev_t) + sizeof(ino_t)]; + +/** + * Compute a unique ID for a file. + */ +void bfs_stat_id(const struct bfs_stat *buf, bfs_file_id *id); + #endif // BFS_STAT_H |