From 8877f9b8a8992388b4f64d425a48b02a3229cf61 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 27 Jun 2025 01:56:38 -0400 Subject: kernel: namei: Add NAMEI_WANTPARENT flag In some lookup cases, we may only be interested in the parent component. For example, the parent of "/foo/bar/mrow" is "/foo/bar/". The NAMEI_WANTPARENT asks namei to only look for the parent rather than the full path. Signed-off-by: Ian Moffett --- sys/include/sys/namei.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/include') diff --git a/sys/include/sys/namei.h b/sys/include/sys/namei.h index f81f905..ccd7f35 100644 --- a/sys/include/sys/namei.h +++ b/sys/include/sys/namei.h @@ -32,6 +32,9 @@ #include #include +#include + +#define NAMEI_WANTPARENT BIT(0) /* Request parent only */ struct nameidata { const char *path; /* Pathname */ -- cgit v1.2.3