From f933a2b93b8887e7104b15df85c6a8a3ed99df69 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sat, 27 Sep 2025 17:58:56 -0400 Subject: kern: namei: Fallback to path parse if lookup fail If the filesystem is marked to require image-like paths but the path could not be found, fallback to parsing it manually as perhaps it is somewhere else. Signed-off-by: Ian Moffett --- src/sys/os/vfs_namei.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/sys') diff --git a/src/sys/os/vfs_namei.c b/src/sys/os/vfs_namei.c index 18d35f2..5c7f557 100644 --- a/src/sys/os/vfs_namei.c +++ b/src/sys/os/vfs_namei.c @@ -89,7 +89,11 @@ namei(struct nameidata *ndp) lookup.name = ndp->path; lookup.dirvp = mp->vp; lookup.vpp = &vp; - return vops->lookup(&lookup); + + /* If it was found, return */ + error = vops->lookup(&lookup); + if (error == 0) + return 0; } printf("namei: f: %s\n", ndp->path); -- cgit v1.2.3