summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-18 22:38:41 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-18 22:38:41 +0200
commit3b63d2d31d0850bd7a81ab9b468218d2c4c461e8 (patch)
tree8c630affc7b088bfa61419b1684a3dd64bb03860 /src/util.c
parent12aad1d075a6cfa23920b977146e79d8154f2540 (diff)
tmpfiles: integrate kay's directory cleanup code and otherwise beef up tmpfiles quite a bit
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 434f311e71..5df78344aa 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3333,6 +3333,10 @@ bool null_or_empty(struct stat *st) {
return false;
}
+DIR *xopendirat(int fd, const char *name) {
+ return fdopendir(openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC));
+}
+
static const char *const ioprio_class_table[] = {
[IOPRIO_CLASS_NONE] = "none",
[IOPRIO_CLASS_RT] = "realtime",