git: 8b2ce7a3bbd0 - main - linux_name_to_handle_at: Support AT_EMPTY_PATH.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 Nov 2021 00:04:31 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3 commit 8b2ce7a3bbd0a754d31ff3943d918b4c84c831a3 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-11-17 23:51:18 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-11-17 23:51:18 +0000 linux_name_to_handle_at: Support AT_EMPTY_PATH. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33050 --- sys/compat/linux/linux_file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a076c849aec8..bda843286b26 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -282,9 +282,6 @@ linux_name_to_handle_at(struct thread *td, if (args->flags & ~valid_flags) return (EINVAL); - if (args->flags & LINUX_AT_EMPTY_PATH) - /* XXX: not supported yet */ - return (EOPNOTSUPP); fd = args->dirfd; if (fd == LINUX_AT_FDCWD) @@ -293,6 +290,8 @@ linux_name_to_handle_at(struct thread *td, bsd_flags = 0; if (!(args->flags & LINUX_AT_SYMLINK_FOLLOW)) bsd_flags |= AT_SYMLINK_NOFOLLOW; + if ((args->flags & LINUX_AT_EMPTY_PATH) != 0) + bsd_flags |= AT_EMPTY_PATH; if (!LUSECONVPATH(td)) { error = kern_getfhat(td, bsd_flags, fd, args->name,