提交 801e6da2 编写于 作者: J Ján Tomko

qemu: add private data to virDomainFSDef

Wire up the allocation and disposal of private data.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 5120577e
......@@ -1407,6 +1407,43 @@ qemuDomainNetworkPrivateDispose(void *obj G_GNUC_UNUSED)
}
static virClassPtr qemuDomainFSPrivateClass;
static void qemuDomainFSPrivateDispose(void *obj);
static int
qemuDomainFSPrivateOnceInit(void)
{
if (!VIR_CLASS_NEW(qemuDomainFSPrivate, virClassForObject()))
return -1;
return 0;
}
VIR_ONCE_GLOBAL_INIT(qemuDomainFSPrivate);
static virObjectPtr
qemuDomainFSPrivateNew(void)
{
qemuDomainFSPrivatePtr priv;
if (qemuDomainFSPrivateInitialize() < 0)
return NULL;
if (!(priv = virObjectNew(qemuDomainFSPrivateClass)))
return NULL;
return (virObjectPtr) priv;
}
static void
qemuDomainFSPrivateDispose(void *obj G_GNUC_UNUSED)
{
}
static virClassPtr qemuDomainVideoPrivateClass;
static void qemuDomainVideoPrivateDispose(void *obj);
......@@ -3865,6 +3902,7 @@ virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = {
.graphicsNew = qemuDomainGraphicsPrivateNew,
.networkNew = qemuDomainNetworkPrivateNew,
.videoNew = qemuDomainVideoPrivateNew,
.fsNew = qemuDomainFSPrivateNew,
.parse = qemuDomainObjPrivateXMLParse,
.format = qemuDomainObjPrivateXMLFormat,
.getParseOpaque = qemuDomainObjPrivateXMLGetParseOpaque,
......
......@@ -560,6 +560,18 @@ struct _qemuDomainNetworkPrivate {
};
#define QEMU_DOMAIN_FS_PRIVATE(dev) \
((qemuDomainFSPrivatePtr) (dev)->privateData)
typedef struct _qemuDomainFSPrivate qemuDomainFSPrivate;
typedef qemuDomainFSPrivate *qemuDomainFSPrivatePtr;
struct _qemuDomainFSPrivate {
virObject parent;
int dummy;
};
typedef enum {
QEMU_PROCESS_EVENT_WATCHDOG = 0,
QEMU_PROCESS_EVENT_GUESTPANIC,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册