log: change qemu_loglevel to unsigned
Bindgen makes the LOG_* constants unsigned, even if they are defined as (1 << 15): pub const LOG_TRACE: u32 = 32768; Make them unsigned in C as well through the BIT() macro, and also change the type of the variable that they are used with. Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20250929154938.594389-14-pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
42f73f264a
commit
75871d88d3
4 changed files with 26 additions and 26 deletions
|
|
@ -142,7 +142,7 @@ macro_rules! log_mask_ln {
|
|||
let _: $crate::log::Log = $mask;
|
||||
|
||||
if unsafe {
|
||||
($crate::bindings::qemu_loglevel & ($mask as std::os::raw::c_int)) != 0
|
||||
($crate::bindings::qemu_loglevel & ($mask as std::os::raw::c_uint)) != 0
|
||||
} {
|
||||
_ = $crate::log::LogGuard::log_fmt(
|
||||
format_args!("{}\n", format_args!($fmt $($args)*)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue