summaryrefslogtreecommitdiffstats
path: root/stat.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-03-06 22:25:56 -0800
committerTavian Barnes <tavianator@tavianator.com>2019-03-06 22:25:56 -0800
commitb1d0e0e97ce747534a945a6fe0c3a15ccd8dbf00 (patch)
tree57b2f054611114783e7499996e730611691f94ff /stat.c
parentd4a4ef26ef5245813ed74847147ce7f58c5a5232 (diff)
downloadbfs-b1d0e0e97ce747534a945a6fe0c3a15ccd8dbf00.tar.xz
parse: Use a trie to hold currently open files
Diffstat (limited to 'stat.c')
-rw-r--r--stat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/stat.c b/stat.c
index d223ff8..d94ddb0 100644
--- a/stat.c
+++ b/stat.c
@@ -334,3 +334,8 @@ const struct timespec *bfs_stat_time(const struct bfs_stat *buf, enum bfs_stat_f
return NULL;
}
}
+
+void bfs_stat_id(const struct bfs_stat *buf, bfs_file_id *id) {
+ memcpy(*id, &buf->dev, sizeof(buf->dev));
+ memcpy(*id + sizeof(buf->dev), &buf->ino, sizeof(buf->ino));
+}