From b1d0e0e97ce747534a945a6fe0c3a15ccd8dbf00 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 Mar 2019 22:25:56 -0800 Subject: parse: Use a trie to hold currently open files --- stat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'stat.h') diff --git a/stat.h b/stat.h index 3887db4..59a9712 100644 --- a/stat.h +++ b/stat.h @@ -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 -- cgit v1.2.3