mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
vmstate: replace DeviceState with VMStateIf
Replace DeviceState dependency with VMStateIf on vmstate API. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Halil Pasic <pasic@linux.ibm.com>
This commit is contained in:
parent
107b59698f
commit
3cad405bab
17 changed files with 41 additions and 38 deletions
|
@ -1158,22 +1158,22 @@ int vmstate_save_state_v(QEMUFile *f, const VMStateDescription *vmsd,
|
|||
bool vmstate_save_needed(const VMStateDescription *vmsd, void *opaque);
|
||||
|
||||
/* Returns: 0 on success, -1 on failure */
|
||||
int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
|
||||
int vmstate_register_with_alias_id(VMStateIf *obj, int instance_id,
|
||||
const VMStateDescription *vmsd,
|
||||
void *base, int alias_id,
|
||||
int required_for_version,
|
||||
Error **errp);
|
||||
|
||||
/* Returns: 0 on success, -1 on failure */
|
||||
static inline int vmstate_register(DeviceState *dev, int instance_id,
|
||||
static inline int vmstate_register(VMStateIf *obj, int instance_id,
|
||||
const VMStateDescription *vmsd,
|
||||
void *opaque)
|
||||
{
|
||||
return vmstate_register_with_alias_id(dev, instance_id, vmsd,
|
||||
return vmstate_register_with_alias_id(obj, instance_id, vmsd,
|
||||
opaque, -1, 0, NULL);
|
||||
}
|
||||
|
||||
void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
|
||||
void vmstate_unregister(VMStateIf *obj, const VMStateDescription *vmsd,
|
||||
void *opaque);
|
||||
|
||||
struct MemoryRegion;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue