From owner-dev-commits-src-all@freebsd.org Thu Apr 15 14:31:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8FB25F2A92; Thu, 15 Apr 2021 14:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FLhbd56ZNz4SC1; Thu, 15 Apr 2021 14:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A266512FFD; Thu, 15 Apr 2021 14:31:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13FEV9xr053335; Thu, 15 Apr 2021 14:31:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13FEV9Ys053334; Thu, 15 Apr 2021 14:31:09 GMT (envelope-from git) Date: Thu, 15 Apr 2021 14:31:09 GMT Message-Id: <202104151431.13FEV9Ys053334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 1663120ae452 - main - linux: implement O_PATH MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1663120ae452fe3783c74ce40522caf0e2327608 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2021 14:31:09 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=1663120ae452fe3783c74ce40522caf0e2327608 commit 1663120ae452fe3783c74ce40522caf0e2327608 Author: Edward Tomasz Napierala AuthorDate: 2021-04-15 14:24:51 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-04-15 14:30:59 +0000 linux: implement O_PATH Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D29773 --- sys/compat/linux/linux_file.c | 2 ++ sys/compat/linux/linux_file.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 0c40a14d58f7..438b100d4e21 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -162,6 +162,8 @@ linux_common_openflags(int l_flags) bsd_flags |= O_NOFOLLOW; if (l_flags & LINUX_O_DIRECTORY) bsd_flags |= O_DIRECTORY; + if (l_flags & LINUX_O_PATH) + bsd_flags |= O_PATH; /* XXX LINUX_O_NOATIME: unable to be easily implemented. */ return (bsd_flags); } diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 03450b95f25c..ab137ba6b9c3 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -84,6 +84,7 @@ #define LINUX_O_NOFOLLOW 000400000 /* Do not follow links */ #define LINUX_O_NOATIME 001000000 #define LINUX_O_CLOEXEC 002000000 +#define LINUX_O_PATH 010000000 #define LINUX_F_DUPFD 0 #define LINUX_F_GETFD 1