summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-27 01:56:38 -0400
committerIan Moffett <ian@osmora.org>2025-06-27 02:01:06 -0400
commit8877f9b8a8992388b4f64d425a48b02a3229cf61 (patch)
tree14d161e9d6471821f02429bc9465fd75caf4524f /sys/include
parentb9ecd48242fd2e08242704d2d0d1b919f88401c2 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/namei.h3
1 files changed, 3 insertions, 0 deletions
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 <sys/types.h>
#include <sys/vnode.h>
+#include <sys/param.h>
+
+#define NAMEI_WANTPARENT BIT(0) /* Request parent only */
struct nameidata {
const char *path; /* Pathname */