fs-util: use int for argument that takes F_OK and friends
access_nofollow() is a simple wrapper of faccessat(), and it is defined as ``` int faccessat(int dirfd, const char *pathname, int mode, int flags); ```
This commit is contained in:
+1
-1
@@ -368,7 +368,7 @@ int fd_warn_permissions(const char *path, int fd) {
|
||||
return stat_warn_permissions(path, &st);
|
||||
}
|
||||
|
||||
int access_nofollow(const char *path, mode_t mode) {
|
||||
int access_nofollow(const char *path, int mode) {
|
||||
return RET_NERRNO(faccessat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ int futimens_opath(int fd, const struct timespec ts[2]);
|
||||
int fd_warn_permissions(const char *path, int fd);
|
||||
int stat_warn_permissions(const char *path, const struct stat *st);
|
||||
|
||||
int access_nofollow(const char *path, mode_t mode);
|
||||
int access_nofollow(const char *path, int mode);
|
||||
|
||||
int touch_fd(int fd, usec_t stamp);
|
||||
int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode);
|
||||
|
||||
Reference in New Issue
Block a user