summaryrefslogtreecommitdiffstats
path: root/src/basic/fs-util.h
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-03-14 09:55:04 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-03-14 09:55:04 +0100
commit7486f9c3421a5cd011c72a8c8d9c8b1cf62410ca (patch)
tree1a1fabfe61fa795fe8a3a9efae4d327fd1f3c2f4 /src/basic/fs-util.h
parentsystemctl: refuse to acquire dbus connection with --global (diff)
downloadsystemd-7486f9c3421a5cd011c72a8c8d9c8b1cf62410ca.tar.xz
systemd-7486f9c3421a5cd011c72a8c8d9c8b1cf62410ca.zip
fs-util: Add xopenat()
xopenat() will create directories if O_DIRECTORY and O_CREAT are specified. Note that this is not an atomic operation.
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r--src/basic/fs-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 932d003f19..3db9df2224 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -129,3 +129,5 @@ int parse_cifs_service(const char *s, char **ret_host, char **ret_service, char
int open_mkdir_at(int dirfd, const char *path, int flags, mode_t mode);
int openat_report_new(int dirfd, const char *pathname, int flags, mode_t mode, bool *ret_newly_created);
+
+int xopenat(int dir_fd, const char *path, int flags, mode_t mode);