mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
vmstate: add qom interface to get id
Add an interface to get the instance id, instead of depending on Device and qdev_get_dev_path(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
b0b74e1f17
commit
107b59698f
8 changed files with 85 additions and 0 deletions
23
hw/core/vmstate-if.c
Normal file
23
hw/core/vmstate-if.c
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* VMState interface
|
||||
*
|
||||
* Copyright (c) 2009-2019 Red Hat Inc
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/vmstate-if.h"
|
||||
|
||||
static const TypeInfo vmstate_if_info = {
|
||||
.name = TYPE_VMSTATE_IF,
|
||||
.parent = TYPE_INTERFACE,
|
||||
.class_size = sizeof(VMStateIfClass),
|
||||
};
|
||||
|
||||
static void vmstate_register_types(void)
|
||||
{
|
||||
type_register_static(&vmstate_if_info);
|
||||
}
|
||||
|
||||
type_init(vmstate_register_types);
|
Loading…
Add table
Add a link
Reference in a new issue