mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-10-27 12:15:39 +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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user