summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-11-21 16:42:22 -0500
committerIan Moffett <ian@osmora.org>2025-11-21 16:42:22 -0500
commit4143fa418123bd6596be4d2b054ff257ea0e0f03 (patch)
tree5b9e622d5a73dca67c192426be4d2c1f3be11947
parentc30a7ec74cfc19c8544b0f6fb9b8030f54e0f394 (diff)
kern: namei: Look up vnodes using vops
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/kern/kern_namei.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_namei.c b/sys/kern/kern_namei.c
index 7a530d7..3661445 100644
--- a/sys/kern/kern_namei.c
+++ b/sys/kern/kern_namei.c
@@ -32,11 +32,10 @@
#include <kern/mount.h>
#include <kern/namei.h>
-#include <os/trace.h>
-
int
namei(struct nameidata *ndp)
{
+ struct vops *vops;
struct mount *mpoint = NULL;
struct vnode *vp = NULL;
const char *p;
@@ -52,8 +51,6 @@ namei(struct nameidata *ndp)
return -EINVAL;
}
- trace("f: %s\n", ndp->pathname);
-
/* Iterate through the path */
p = ndp->pathname;
while (*p != '\0') {
@@ -91,7 +88,12 @@ namei(struct nameidata *ndp)
continue;
}
- trace("d: %s\n", namebuf);
+ vops = &vp->vops;
+ error = vnode_lookup(vp, namebuf, &vp);
+ if (error != 0) {
+ return error;
+ }
+
namebuf_idx = 0;
}