git: ee384b229dc6 - main - linux(4): make linkat(2) handle AT_EMPTY_PATH
Edward Tomasz Napierala
trasz at FreeBSD.org
Tue May 4 12:37:02 UTC 2021
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=ee384b229dc62b2b0c9180db8c71fa99f30144cf
commit ee384b229dc62b2b0c9180db8c71fa99f30144cf
Author: Edward Tomasz Napierala <trasz at FreeBSD.org>
AuthorDate: 2021-05-04 12:09:31 +0000
Commit: Edward Tomasz Napierala <trasz at FreeBSD.org>
CommitDate: 2021-05-04 12:09:46 +0000
linux(4): make linkat(2) handle AT_EMPTY_PATH
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D29974
---
sys/compat/linux/linux_file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 1febb11b0131..0549d536ba51 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1134,11 +1134,12 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args)
char *path, *to;
int error, olddfd, newdfd, flag;
- if (args->flag & ~LINUX_AT_SYMLINK_FOLLOW)
+ if (args->flag & ~(LINUX_AT_SYMLINK_FOLLOW | LINUX_AT_EMPTY_PATH))
return (EINVAL);
flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? AT_SYMLINK_FOLLOW :
0;
+ flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? AT_EMPTY_PATH : 0;
olddfd = (args->olddfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->olddfd;
newdfd = (args->newdfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->newdfd;
More information about the dev-commits-src-main
mailing list