From 44e79e22fa6ca45539f8bb09eda0681e8ec208fe Mon Sep 17 00:00:00 2001 From: SuchAFuriousDeath <48620541+SuchAFuriousDeath@users.noreply.github.com> Date: Sun, 31 Mar 2024 20:33:20 +0200 Subject: [PATCH] Fixes library mount (#791) --- src/kernel/src/fs/tmp/node.rs | 4 ++-- src/kernel/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kernel/src/fs/tmp/node.rs b/src/kernel/src/fs/tmp/node.rs index 08787b19a..97e778d8e 100644 --- a/src/kernel/src/fs/tmp/node.rs +++ b/src/kernel/src/fs/tmp/node.rs @@ -152,7 +152,7 @@ impl crate::fs::VnodeBackend for VnodeBackend { let dirent = entries .iter() .find(|dirent| dirent.name() == name) - .ok_or_else(|| LookupError::NoParent)?; + .ok_or(LookupError::NotFound)?; let vnode = self .tmpfs @@ -237,7 +237,7 @@ pub enum LookupError { #[error("tmpfs node not found")] #[errno(ENOENT)] - NoParent, + NotFound, #[error("failed to alloc vnode")] FailedToAllocVnode(#[from] AllocVnodeError), diff --git a/src/kernel/src/main.rs b/src/kernel/src/main.rs index 3d3ae1103..2a994cee3 100644 --- a/src/kernel/src/main.rs +++ b/src/kernel/src/main.rs @@ -286,7 +286,7 @@ fn run() -> Result<(), KernelError> { } // TODO: Check permission of /mnt/sandbox/CUSAXXXXX_000//common/lib on the PS4. - let lib_path = system_path.join("lib").unwrap(); + let lib_path = common_path.join("lib").unwrap(); if let Err(e) = fs.mkdir(&lib_path, 0o555, None) { return Err(KernelError::CreateDirectoryFailed(lib_path, e));