fs-util: Add open_parent_at()

This commit is contained in:
Daan De Meyer
2023-03-21 15:20:01 +01:00
parent aea3ca3613
commit 14460a8a2b
2 changed files with 18 additions and 4 deletions
+4 -1
View File
@@ -113,7 +113,10 @@ typedef enum UnlinkDeallocateFlags {
int unlinkat_deallocate(int fd, const char *name, UnlinkDeallocateFlags flags);
int open_parent(const char *path, int flags, mode_t mode);
int open_parent_at(int dir_fd, const char *path, int flags, mode_t mode);
static inline int open_parent(const char *path, int flags, mode_t mode) {
return open_parent_at(AT_FDCWD, path, flags, mode);
}
int conservative_renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
static inline int conservative_rename(const char *oldpath, const char *newpath) {