aboutsummaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-09-17 19:47:57 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-09-17 19:58:30 +0000
commit7ae60af75b78f408420512c58fd5a08ca7a88bad (patch)
tree51ef7f542c448a0717e69029f1b9dd164933c7bd /include/sys
parent6841aed6c4abde1aa7015348496c86cadc227a1f (diff)
downloadglibc-7ae60af75b78f408420512c58fd5a08ca7a88bad.zip
glibc-7ae60af75b78f408420512c58fd5a08ca7a88bad.tar.gz
glibc-7ae60af75b78f408420512c58fd5a08ca7a88bad.tar.bz2
hurd: Factorize at/non-at functions
Non-at functions can be implemented by just calling the corresponding at function with AT_FDCWD and zero at_flags. In the linkat case, the at behavior is different (O_NOLINK), so this introduces __linkat_common to pass O_NOLINK as appropriate. lstat functions can also be implemented with fstatat by adding __fstatat64_common which takes a flags parameter in addition to the at_flags parameter, In the end this factorizes chmod, chown, link, lstat64, mkdir, readlink, rename, stat64, symlink, unlink, utimes. This also makes __lstat, __lxstat64, __stat and __xstat64 directly use __fstatat64_common instead of __lstat64 or __stat64.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/stat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index 13e777b..4a29e84 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -66,10 +66,12 @@ hidden_proto (__fstatat64_time64);
extern int __chmod (const char *__file, __mode_t __mode);
libc_hidden_proto (__chmod)
extern int __fchmod (int __fd, __mode_t __mode);
+extern int __fchmodat (int __fd, const char *__file, mode_t __mode, int __flag);
libc_hidden_proto (fchmodat)
extern __mode_t __umask (__mode_t __mask);
extern int __mkdir (const char *__path, __mode_t __mode);
libc_hidden_proto (__mkdir)
+extern int __mkdirat (int __fd, const char *__path, mode_t __mode);
extern int __mknodat (int fd, const char *path, mode_t mode, dev_t dev);
libc_hidden_proto (__mknodat);