@@ -27,7 +27,7 @@ extern "C" fn pl011_clock_needed(opaque: *mut c_void) -> bool {
minimum_version_id: 1,
needed: Some(pl011_clock_needed),
fields: vmstate_fields! {
- vmstate_clock!(clock, PL011State),
+ vmstate_clock!(PL011State, clock),
},
..Zeroable::ZERO
};
@@ -457,7 +457,7 @@ macro_rules! vmstate_struct {
#[doc(alias = "VMSTATE_CLOCK")]
#[macro_export]
macro_rules! vmstate_clock {
- ($field_name:ident, $struct_name:ty) => {{
+ ($struct_name:ty, $field_name:ident) => {{
$crate::bindings::VMStateField {
name: ::core::concat!(::core::stringify!($field_name), "\0")
.as_bytes()
Place struct_name before field_name, similar to offset_of. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- rust/hw/char/pl011/src/device_class.rs | 2 +- rust/qemu-api/src/vmstate.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)