mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-08 14:29:56 +00:00
qemu: add private data for vsock
Introduce a structure and a class that will be used to store the private data. https://bugzilla.redhat.com/show_bug.cgi?id=1291851 Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d4abb7b45d
commit
c310a5567b
@ -1135,6 +1135,41 @@ qemuDomainChrSourcePrivateDispose(void *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static virClassPtr qemuDomainVsockPrivateClass;
|
||||||
|
static void qemuDomainVsockPrivateDispose(void *obj);
|
||||||
|
|
||||||
|
static int
|
||||||
|
qemuDomainVsockPrivateOnceInit(void)
|
||||||
|
{
|
||||||
|
if (!VIR_CLASS_NEW(qemuDomainVsockPrivate, virClassForObject()))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
VIR_ONCE_GLOBAL_INIT(qemuDomainVsockPrivate)
|
||||||
|
|
||||||
|
static virObjectPtr
|
||||||
|
qemuDomainVsockPrivateNew(void)
|
||||||
|
{
|
||||||
|
qemuDomainVsockPrivatePtr priv;
|
||||||
|
|
||||||
|
if (qemuDomainVsockPrivateInitialize() < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!(priv = virObjectNew(qemuDomainVsockPrivateClass)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return (virObjectPtr) priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
qemuDomainVsockPrivateDispose(void *obj ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* qemuDomainSecretPlainSetup:
|
/* qemuDomainSecretPlainSetup:
|
||||||
* @secinfo: Pointer to secret info
|
* @secinfo: Pointer to secret info
|
||||||
* @usageType: The virSecretUsageType
|
* @usageType: The virSecretUsageType
|
||||||
@ -2816,6 +2851,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
|
|||||||
.diskNew = qemuDomainDiskPrivateNew,
|
.diskNew = qemuDomainDiskPrivateNew,
|
||||||
.vcpuNew = qemuDomainVcpuPrivateNew,
|
.vcpuNew = qemuDomainVcpuPrivateNew,
|
||||||
.chrSourceNew = qemuDomainChrSourcePrivateNew,
|
.chrSourceNew = qemuDomainChrSourcePrivateNew,
|
||||||
|
.vsockNew = qemuDomainVsockPrivateNew,
|
||||||
.parse = qemuDomainObjPrivateXMLParse,
|
.parse = qemuDomainObjPrivateXMLParse,
|
||||||
.format = qemuDomainObjPrivateXMLFormat,
|
.format = qemuDomainObjPrivateXMLFormat,
|
||||||
.getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque,
|
.getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque,
|
||||||
|
@ -442,6 +442,15 @@ struct _qemuDomainChrSourcePrivate {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _qemuDomainVsockPrivate qemuDomainVsockPrivate;
|
||||||
|
typedef qemuDomainVsockPrivate *qemuDomainVsockPrivatePtr;
|
||||||
|
struct _qemuDomainVsockPrivate {
|
||||||
|
virObject parent;
|
||||||
|
|
||||||
|
virTristateBool maybe;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
QEMU_PROCESS_EVENT_WATCHDOG = 0,
|
QEMU_PROCESS_EVENT_WATCHDOG = 0,
|
||||||
QEMU_PROCESS_EVENT_GUESTPANIC,
|
QEMU_PROCESS_EVENT_GUESTPANIC,
|
||||||
|
Loading…
Reference in New Issue
Block a user