qemu/rust/qemu-api/src
Paolo Bonzini 8a420dd109 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>
2025-02-25 16:18:08 +01:00
..
assertions.rs rust: add module to convert between success/-errno and io::Result 2025-02-25 16:18:08 +01:00
bindings.rs rust: qemu_api: add a documentation header for all modules 2025-02-13 12:51:34 +01:00
bitops.rs rust: add a bit operation module 2024-12-10 18:49:26 +01:00
c_str.rs rust: qemu_api: add a documentation header for all modules 2025-02-13 12:51:34 +01:00
callbacks.rs rust: callbacks: allow passing optional callbacks as () 2025-02-13 12:19:33 +01:00
cell.rs bql: add a "mock" BQL for Rust unit tests 2024-12-19 19:36:37 +01:00
chardev.rs rust: chardev, qdev: add bindings to qdev_prop_set_chr 2025-02-13 12:19:34 +01:00
errno.rs rust: add module to convert between success/-errno and io::Result 2025-02-25 16:18:08 +01:00
irq.rs rust: add bindings for gpio_{in|out} initialization 2025-02-13 12:51:34 +01:00
lib.rs rust: add module to convert between success/-errno and io::Result 2025-02-25 16:18:08 +01:00
memory.rs rust: add bindings for memattrs 2025-02-13 12:51:34 +01:00
module.rs rust: rename qemu-api modules to follow C code a bit more 2024-12-19 19:36:37 +01:00
offset_of.rs rust: qemu_api: add a documentation header for all modules 2025-02-13 12:51:34 +01:00
prelude.rs rust: add module to convert between success/-errno and io::Result 2025-02-25 16:18:08 +01:00
qdev.rs rust: add bindings for gpio_{in|out} initialization 2025-02-13 12:51:34 +01:00
qom.rs rust: qom: allow initializing interface vtables 2025-02-13 12:19:33 +01:00
sysbus.rs rust: qemu_api: add a documentation header for all modules 2025-02-13 12:51:34 +01:00
timer.rs rust: add bindings for timer 2025-02-13 12:51:34 +01:00
vmstate.rs rust: fix doctests 2025-02-13 13:50:43 +01:00
zeroable.rs rust: fix doctests 2025-02-13 13:50:43 +01:00