From 201c982b26144ee61b4b9e181c15c208cf7c46df Mon Sep 17 00:00:00 2001 From: pjht Date: Wed, 20 Nov 2024 12:30:24 -0600 Subject: [PATCH] Change the error when trying to write to a file to EROFS --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index f51a21b..10b852e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ impl fs_rpc::Server for Serv { fn open(&self, path: &std::path::Path, mode: FileOpenMode, mount_id: u64) -> Result<(Option, u64), Errno> { if !mode.readable() || mode.writable() { // WRiting isn't supported yet, so the only sensible mode is readonly. - return Err(Errno::EACCES); + return Err(Errno::EROFS); } let mounts = self.mounts.read(); let mount = &mounts[mount_id as usize];