Am 13.02.2025 um 15:32 hat Paolo Bonzini geschrieben:
> 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 <[email protected]>
'make rustdoc' fails for me with this patch applied:
error: unresolved link to `io::Result`
--> qemu-api/src/errno.rs:105:55
|
105 | /// A signed type that can be converted into an [`io::Result`]
| ^^^^^^^^^^ no item
named `io` in scope
|
= note: requested on the command line with `-D
rustdoc::broken-intra-doc-links`
error: unresolved link to `io::Result`
--> qemu-api/src/errno.rs:114:46
|
114 | /// A type that can be taken out of an [`io::Result`] and converted
| ^^^^^^^^^^ no item named
`io` in scope
error: unresolved link to `into_neg_errno`
--> qemu-api/src/errno.rs:118:15
|
118 | /// [`into_neg_errno`].
| ^^^^^^^^^^^^^^ no item named `into_neg_errno` in scope
|
= help: to escape `[` and `]` characters, add '\' before them like `\[` or
`\]`
error: could not document `qemu_api`
Kevin