diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-14 09:05:38 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-02-25 16:18:08 +0100 |
commit | 8a420dd109b9e4e2244cfa32bc92829093268b3e (patch) | |
tree | 40e9db642b552c7bb840cd7f46bda933d2e0c517 /docs/devel | |
parent | 4cfe9edb1b1961af9cda74351f73b0abb3159b67 (diff) | |
download | qemu-8a420dd109b9e4e2244cfa32bc92829093268b3e.zip qemu-8a420dd109b9e4e2244cfa32bc92829093268b3e.tar.gz qemu-8a420dd109b9e4e2244cfa32bc92829093268b3e.tar.bz2 |
rust: add module to convert between success/-errno and io::Result
It is a common convention in QEMU to return a positive value in case of
success, and a negated errno value in case of error. Unfortunately,
using errno portably in Rust is a bit complicated; on Unix the errno
values are supported natively by io::Error, but on Windows they are not;
so, use the libc crate.
This is a set of utility functions that are used by both chardev and
block layer bindings.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/devel')
-rw-r--r-- | docs/devel/rust.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/devel/rust.rst b/docs/devel/rust.rst index 90958e5..c75dccd 100644 --- a/docs/devel/rust.rst +++ b/docs/devel/rust.rst @@ -179,6 +179,7 @@ module status ``callbacks`` complete ``cell`` stable ``c_str`` complete +``errno`` complete ``irq`` complete ``memory`` stable ``module`` complete |