Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 May 2021 19:39:46 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: b4f9b6eef2bb - main - linux(4): Handle AT_EMPTY_PATH in the utimensat syscall.
Message-ID:  <202105311939.14VJdkmq059145@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=b4f9b6eef2bb30059cf1040383c88c94f4d093a5

commit b4f9b6eef2bb30059cf1040383c88c94f4d093a5
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-05-31 19:37:06 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2021-05-31 19:37:06 +0000

    linux(4): Handle AT_EMPTY_PATH in the utimensat syscall.
    
    Differential Revision:  https://reviews.freebsd.org/D30518
    MFC after:              2 weeks
---
 sys/compat/linux/linux_misc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 2be328a0d6d2..9676cad893c1 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -813,7 +813,7 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args)
 
 	dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd;
 
-	if (args->flags & ~LINUX_AT_SYMLINK_NOFOLLOW)
+	if (args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH))
 		return (EINVAL);
 
 	if (args->times != NULL) {
@@ -863,6 +863,8 @@ linux_utimensat(struct thread *td, struct linux_utimensat_args *args)
 
 	if (args->flags & LINUX_AT_SYMLINK_NOFOLLOW)
 		flags |= AT_SYMLINK_NOFOLLOW;
+	if (args->flags & LINUX_AT_EMPTY_PATH)
+		flags |= AT_EMPTY_PATH;
 
 	if (!LUSECONVPATH(td)) {
 		if (args->pathname != NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105311939.14VJdkmq059145>