mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_domain: remove passing qemuDomainObjPrivatePtr
as param
`qemuDomainObjPrivatePtr` parameter was avoided being passed as a paramter in functions `qemuDomainObjPrivateXMLParseJob` and `qemuDomainObjPrivateXMLFormatJob`, as we already pass `virDomainObjPtr`, which can be used to get `privateData` pointer. Signed-off-by: Prathamesh Chavan <pc44800@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
31939c80cd
commit
594e61ed82
@ -2224,11 +2224,11 @@ qemuDomainObjPrivateXMLFormatNBDMigration(virBufferPtr buf,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf,
|
qemuDomainObjPrivateXMLFormatJob(virBufferPtr buf,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm)
|
||||||
qemuDomainObjPrivatePtr priv)
|
|
||||||
{
|
{
|
||||||
g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) attrBuf = VIR_BUFFER_INITIALIZER;
|
||||||
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
|
g_auto(virBuffer) childBuf = VIR_BUFFER_INIT_CHILD(buf);
|
||||||
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
qemuDomainJob job = priv->job.active;
|
qemuDomainJob job = priv->job.active;
|
||||||
|
|
||||||
if (!qemuDomainTrackJob(job))
|
if (!qemuDomainTrackJob(job))
|
||||||
@ -2399,7 +2399,7 @@ qemuDomainObjPrivateXMLFormat(virBufferPtr buf,
|
|||||||
if (priv->lockState)
|
if (priv->lockState)
|
||||||
virBufferAsprintf(buf, "<lockstate>%s</lockstate>\n", priv->lockState);
|
virBufferAsprintf(buf, "<lockstate>%s</lockstate>\n", priv->lockState);
|
||||||
|
|
||||||
if (qemuDomainObjPrivateXMLFormatJob(buf, vm, priv) < 0)
|
if (qemuDomainObjPrivateXMLFormatJob(buf, vm) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (priv->fakeReboot)
|
if (priv->fakeReboot)
|
||||||
@ -2948,9 +2948,9 @@ qemuDomainObjPrivateXMLParseJobNBDSource(xmlNodePtr node,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm,
|
qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm,
|
||||||
qemuDomainObjPrivatePtr priv,
|
|
||||||
xmlXPathContextPtr ctxt)
|
xmlXPathContextPtr ctxt)
|
||||||
{
|
{
|
||||||
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
g_autofree xmlNodePtr *nodes = NULL;
|
g_autofree xmlNodePtr *nodes = NULL;
|
||||||
size_t i;
|
size_t i;
|
||||||
int n;
|
int n;
|
||||||
@ -2986,9 +2986,9 @@ qemuDomainObjPrivateXMLParseJobNBD(virDomainObjPtr vm,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainObjPrivateXMLParseJob(virDomainObjPtr vm,
|
qemuDomainObjPrivateXMLParseJob(virDomainObjPtr vm,
|
||||||
qemuDomainObjPrivatePtr priv,
|
|
||||||
xmlXPathContextPtr ctxt)
|
xmlXPathContextPtr ctxt)
|
||||||
{
|
{
|
||||||
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
VIR_XPATH_NODE_AUTORESTORE(ctxt);
|
||||||
g_autofree char *tmp = NULL;
|
g_autofree char *tmp = NULL;
|
||||||
|
|
||||||
@ -3034,7 +3034,7 @@ qemuDomainObjPrivateXMLParseJob(virDomainObjPtr vm,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qemuDomainObjPrivateXMLParseJobNBD(vm, priv, ctxt) < 0)
|
if (qemuDomainObjPrivateXMLParseJobNBD(vm, ctxt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (qemuMigrationParamsParse(ctxt, &priv->job.migParams) < 0)
|
if (qemuMigrationParamsParse(ctxt, &priv->job.migParams) < 0)
|
||||||
@ -3203,7 +3203,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
|||||||
|
|
||||||
priv->lockState = virXPathString("string(./lockstate)", ctxt);
|
priv->lockState = virXPathString("string(./lockstate)", ctxt);
|
||||||
|
|
||||||
if (qemuDomainObjPrivateXMLParseJob(vm, priv, ctxt) < 0)
|
if (qemuDomainObjPrivateXMLParseJob(vm, ctxt) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
priv->fakeReboot = virXPathBoolean("boolean(./fakereboot)", ctxt) == 1;
|
priv->fakeReboot = virXPathBoolean("boolean(./fakereboot)", ctxt) == 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user