Date: Thu, 18 Nov 2021 00:04:29 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a8d885296a9d - main - linux_linkat: Don't invert AT_* flags. Message-ID: <202111180004.1AI04Two054632@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a8d885296a9dc517e731723081c83d97d2aa598f commit a8d885296a9dc517e731723081c83d97d2aa598f Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-11-17 23:51:06 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-11-17 23:51:06 +0000 linux_linkat: Don't invert AT_* flags. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33048 --- sys/compat/linux/linux_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a1146c6a195a..a076c849aec8 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1170,9 +1170,9 @@ linux_linkat(struct thread *td, struct linux_linkat_args *args) if (args->flag & ~(LINUX_AT_SYMLINK_FOLLOW | LINUX_AT_EMPTY_PATH)) return (EINVAL); - flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) == 0 ? AT_SYMLINK_FOLLOW : + flag = (args->flag & LINUX_AT_SYMLINK_FOLLOW) != 0 ? AT_SYMLINK_FOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) == 0 ? AT_EMPTY_PATH : 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111180004.1AI04Two054632>