diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-27 17:58:56 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-27 17:58:56 -0400 |
commit | f933a2b93b8887e7104b15df85c6a8a3ed99df69 (patch) | |
tree | b9df472eb8f8b0542c0bf531524c10deb6280bef /src/sys/os | |
parent | b5dc1c72d3dbe33052b03b0e002cd323c75ebcff (diff) |
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/os')
-rw-r--r-- | src/sys/os/vfs_namei.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |