qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] rust: add module to convert between -errno and io::Error
@ 2025-02-13 14:32 Paolo Bonzini
  2025-02-13 14:32 ` [PATCH 1/2] rust: subprojects: add libc crate Paolo Bonzini
  2025-02-13 14:32 ` [PATCH 2/2] rust: add module to convert between -errno and io::Error Paolo Bonzini
  0 siblings, 2 replies; 6+ messages in thread
From: Paolo Bonzini @ 2025-02-13 14:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-rust, kwolf, qemu-block

Wrap access to errno, for use in the block layer and character device
bindings.

Supersedes: <20250212093958.3703269-1-pbonzini@redhat.com>

v1->v2:
- use the libc crate
- provide separate From<Errno> implementation for io::ErrorKind
- hide GetErrno trait inside a submodule
- add into_neg_errno() and corresponding tests
- add more doctests
- make Errno field public, so that Errno can have other From<...>
  implementations (e.g. going from *mut Error to Errno).


Paolo Bonzini (2):
  rust: subprojects: add libc crate
  rust: add module to convert between -errno and io::Error

 rust/Cargo.lock                               |   7 +
 rust/qemu-api/Cargo.toml                      |   1 +
 rust/qemu-api/meson.build                     |   4 +
 rust/qemu-api/src/assertions.rs               |  28 ++
 rust/qemu-api/src/errno.rs                    | 342 ++++++++++++++++++
 rust/qemu-api/src/lib.rs                      |   1 +
 rust/qemu-api/src/prelude.rs                  |   2 +
 scripts/archive-source.sh                     |   2 +-
 scripts/make-release                          |   2 +-
 subprojects/libc-0.2-rs.wrap                  |   7 +
 .../packagefiles/libc-0.2-rs/meson.build      |  36 ++
 11 files changed, 430 insertions(+), 2 deletions(-)
 create mode 100644 rust/qemu-api/src/errno.rs
 create mode 100644 subprojects/libc-0.2-rs.wrap
 create mode 100644 subprojects/packagefiles/libc-0.2-rs/meson.build

-- 
2.48.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-02-19 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 14:32 [PATCH v2 0/2] rust: add module to convert between -errno and io::Error Paolo Bonzini
2025-02-13 14:32 ` [PATCH 1/2] rust: subprojects: add libc crate Paolo Bonzini
2025-02-19 15:27   ` Zhao Liu
2025-02-13 14:32 ` [PATCH 2/2] rust: add module to convert between -errno and io::Error Paolo Bonzini
2025-02-18 13:57   ` Kevin Wolf
2025-02-18 17:57   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).