From ddda372978f3edea1dc9c2081fb29da1b21b47be Mon Sep 17 00:00:00 2001 From: Amjad Alsharafi <26300843+Amjad50@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:53:42 +0300 Subject: [PATCH] Emerald: Added `OperationNotSupported` syscall error This can happen mostly for Filesystems when they don't support write or creating files --- Cargo.lock | 2 +- library/std/src/sys/pal/emerald/mod.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index e9a739564d8ab..345f6c06430fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1212,7 +1212,7 @@ dependencies = [ [[package]] name = "emerald_kernel_user_link" -version = "0.2.10" +version = "0.2.11" dependencies = [ "compiler_builtins", "rustc-std-workspace-core", diff --git a/library/std/src/sys/pal/emerald/mod.rs b/library/std/src/sys/pal/emerald/mod.rs index 1737267516f80..275a6910982d3 100644 --- a/library/std/src/sys/pal/emerald/mod.rs +++ b/library/std/src/sys/pal/emerald/mod.rs @@ -63,6 +63,9 @@ fn syscall_to_io_error(e: SyscallError) -> crate::io::Error { SyscallError::AlreadyExists => { crate::io::Error::new(crate::io::ErrorKind::AlreadyExists, "Already exists") } + SyscallError::OperationNotSupported => { + crate::io::Error::new(crate::io::ErrorKind::Unsupported, "Not supported") + } SyscallError::InvalidArgument(arg1, arg2, arg3, arg4, arg5, arg6, arg7) => { let errors = [arg1, arg2, arg3, arg4, arg5, arg6, arg7];