fs-util: rename conservative_rename() -> conservative_renameat()
And this introduces conservative_rename() which does not take dirfd.
This commit is contained in:
+1
-1
@@ -1614,7 +1614,7 @@ int path_is_encrypted(const char *path) {
|
||||
return blockdev_is_encrypted(p, 10 /* safety net: maximum recursion depth */);
|
||||
}
|
||||
|
||||
int conservative_rename(
|
||||
int conservative_renameat(
|
||||
int olddirfd, const char *oldpath,
|
||||
int newdirfd, const char *newpath) {
|
||||
|
||||
|
||||
+4
-1
@@ -143,4 +143,7 @@ int open_parent(const char *path, int flags, mode_t mode);
|
||||
|
||||
int path_is_encrypted(const char *path);
|
||||
|
||||
int conservative_rename(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
|
||||
int conservative_renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
|
||||
static inline int conservative_rename(const char *oldpath, const char *newpath) {
|
||||
return conservative_renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user