fs-util: Introduce symlinkat_idempotent
This commit is contained in:
+4
-1
@@ -60,7 +60,10 @@ static inline int touch(const char *path) {
|
||||
return touch_file(path, false, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID);
|
||||
}
|
||||
|
||||
int symlink_idempotent(const char *from, const char *to, bool make_relative);
|
||||
int symlinkat_idempotent(const char *from, int atfd, const char *to, bool make_relative);
|
||||
static inline int symlink_idempotent(const char *from, const char *to, bool make_relative) {
|
||||
return symlinkat_idempotent(from, AT_FDCWD, to, make_relative);
|
||||
}
|
||||
|
||||
int symlinkat_atomic_full(const char *from, int atfd, const char *to, bool make_relative);
|
||||
static inline int symlink_atomic(const char *from, const char *to) {
|
||||
|
||||
Reference in New Issue
Block a user