diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-22 17:04:36 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-03-22 21:54:20 +0100 |
commit | 2646b86dd6a84f2e7ebc625203d44e6d1923c5bd (patch) | |
tree | 835cc1aa3aa41a91508a33e2dde76de745735a06 /src/basic/fs-util.h | |
parent | a3b00f91bb985fa10bc33db5c7883e33dbdf83d0 (diff) | |
download | systemd-2646b86dd6a84f2e7ebc625203d44e6d1923c5bd.tar.gz |
fs-util: Add xopenat_lock()
open/create a file/directory and lock it using the given lock type.
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r-- | src/basic/fs-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index d08e224aa1..cf381dfc26 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -12,6 +12,7 @@ #include "alloc-util.h" #include "errno-util.h" +#include "lock-util.h" #include "time-util.h" #include "user-util.h" @@ -132,3 +133,5 @@ 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); + +int xopenat_lock(int dir_fd, const char *path, int flags, mode_t mode, LockType locktype, int operation); |