summaryrefslogtreecommitdiffstats
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.h b/util.h
index c3b3dbe..fbcadbd 100644
--- a/util.h
+++ b/util.h
@@ -12,9 +12,15 @@
#ifndef BFS_UTIL_H
#define BFS_UTIL_H
+#include <dirent.h>
#include <stdbool.h>
/**
+ * readdir() wrapper that makes error handling cleaner.
+ */
+int xreaddir(DIR *dir, struct dirent **de);
+
+/**
* Check if a file descriptor is open.
*/
bool isopen(int fd);