This series introduces a qemu_log_mask!() macro which works similar to the C
version while catering to Rust expectations. It is just a thin wrapper around
qemu_log(). The macro then gets used in the pl011 device which either had its
logging commented out or relied on eprintln!() which can't be silenced by users.

Note that this is my first Rust contribution, so please check if the usage of
`unsafe` is sound.

Bernhard Beschow (2):
  rust/qemu-api: Add initial logging support based on C API
  rust/hw/char/pl011/src/device: Implement logging

 docs/devel/rust.rst              |  1 +
 rust/wrapper.h                   |  2 ++
 rust/hw/char/pl011/src/device.rs | 12 ++++---
 rust/qemu-api/meson.build        |  1 +
 rust/qemu-api/src/lib.rs         |  1 +
 rust/qemu-api/src/log.rs         | 55 ++++++++++++++++++++++++++++++++
 6 files changed, 68 insertions(+), 4 deletions(-)
 create mode 100644 rust/qemu-api/src/log.rs

-- 
2.49.0


Reply via email to