mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
rust/vmstate: Include complete crate path of VMStateFlags in vmstate_clock
The use of "bindings::*" masks incomplete path of VMStateFlags. Include complete crate path of VMStateFlags in vmstate_clock, and clean up "bindings::*" in device_class.rs of pl011. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250318130219.1799170-16-zhao1.liu@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9bd7e6f7f2
commit
f7b87e464c
2 changed files with 10 additions and 3 deletions
|
@ -8,8 +8,12 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use qemu_api::{
|
use qemu_api::{
|
||||||
bindings::*, c_str, prelude::*, vmstate_clock, vmstate_fields, vmstate_of, vmstate_struct,
|
bindings::{qdev_prop_bool, qdev_prop_chr},
|
||||||
vmstate_subsections, vmstate_unused, zeroable::Zeroable,
|
c_str,
|
||||||
|
prelude::*,
|
||||||
|
vmstate::VMStateDescription,
|
||||||
|
vmstate_clock, vmstate_fields, vmstate_of, vmstate_struct, vmstate_subsections, vmstate_unused,
|
||||||
|
zeroable::Zeroable,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::device::{PL011Registers, PL011State};
|
use crate::device::{PL011Registers, PL011State};
|
||||||
|
|
|
@ -487,7 +487,10 @@ macro_rules! vmstate_clock {
|
||||||
$crate::offset_of!($struct_name, $field_name)
|
$crate::offset_of!($struct_name, $field_name)
|
||||||
},
|
},
|
||||||
size: ::core::mem::size_of::<*const $crate::qdev::Clock>(),
|
size: ::core::mem::size_of::<*const $crate::qdev::Clock>(),
|
||||||
flags: VMStateFlags(VMStateFlags::VMS_STRUCT.0 | VMStateFlags::VMS_POINTER.0),
|
flags: $crate::bindings::VMStateFlags(
|
||||||
|
$crate::bindings::VMStateFlags::VMS_STRUCT.0
|
||||||
|
| $crate::bindings::VMStateFlags::VMS_POINTER.0,
|
||||||
|
),
|
||||||
vmsd: unsafe { ::core::ptr::addr_of!($crate::bindings::vmstate_clock) },
|
vmsd: unsafe { ::core::ptr::addr_of!($crate::bindings::vmstate_clock) },
|
||||||
..$crate::zeroable::Zeroable::ZERO
|
..$crate::zeroable::Zeroable::ZERO
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue