Module Name: src Committed By: christos Date: Sat Aug 12 23:07:46 UTC 2023
Modified Files: src/sys/kern: sys_memfd.c Log Message: Add missing F_GETPATH (from Theodore Preduta) To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/kern/sys_memfd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/sys_memfd.c diff -u src/sys/kern/sys_memfd.c:1.8 src/sys/kern/sys_memfd.c:1.9 --- src/sys/kern/sys_memfd.c:1.8 Sat Jul 29 19:59:59 2023 +++ src/sys/kern/sys_memfd.c Sat Aug 12 19:07:46 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_memfd.c,v 1.8 2023/07/29 23:59:59 rin Exp $ */ +/* $NetBSD: sys_memfd.c,v 1.9 2023/08/12 23:07:46 christos Exp $ */ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sys_memfd.c,v 1.8 2023/07/29 23:59:59 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_memfd.c,v 1.9 2023/08/12 23:07:46 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -242,6 +242,10 @@ memfd_fcntl(file_t *fp, u_int cmd, void int error = 0; switch (cmd) { + case F_GETPATH: + strncpy(data, mfd->mfd_name, sizeof(mfd->name) - 1); + return 0; + case F_ADD_SEALS: mutex_enter(&fp->f_lock);