From 1461752f0fa4bcd7e60d51fe47e3430f8a81cdd8 Mon Sep 17 00:00:00 2001 From: Tanish Desai Date: Mon, 29 Sep 2025 17:49:38 +0200 Subject: tracetool/syslog: add Rust support The syslog backend needs the syslog function from libc and the LOG_INFO enum value; they are re-exported as "::trace::syslog" and "::trace::LOG_INFO" so that device crates do not all have to add the libc dependency, but otherwise there is nothing special. Signed-off-by: Tanish Desai Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-ID: <20250929154938.594389-17-pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi --- rust/trace/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rust/trace/src') diff --git a/rust/trace/src/lib.rs b/rust/trace/src/lib.rs index 0955461573..e03bce43c4 100644 --- a/rust/trace/src/lib.rs +++ b/rust/trace/src/lib.rs @@ -3,6 +3,10 @@ //! This crate provides macros that aid in using QEMU's tracepoint //! functionality. +#[doc(hidden)] +/// Re-exported item to avoid adding libc as a dependency everywhere. +pub use libc::{syslog, LOG_INFO}; + #[macro_export] /// Define the trace-points from the named directory (which should have slashes /// replaced by underscore characters) as functions in a module called `trace`. -- cgit 1.4.1