mirror of
https://sourceware.org/git/glibc.git
synced 2025-09-11 12:10:50 +03:00
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.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
mkdirat (int fd, const char *path, mode_t mode)
|
||||
__mkdirat (int fd, const char *path, mode_t mode)
|
||||
{
|
||||
error_t err;
|
||||
const char *name;
|
||||
@@ -40,3 +40,5 @@ mkdirat (int fd, const char *path, mode_t mode)
|
||||
return __hurd_fail (err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
weak_alias (__mkdirat, mkdirat)
|
||||
|
Reference in New Issue
Block a user