提交 d8d4b9d9 编写于 作者: J Jiri Denemark

Remove virDomainRNGInsert

It was just a useless wrapper around VIR_APPEND_ELEMENT*.
上级 c4111209
......@@ -14039,18 +14039,6 @@ virDomainChrRemove(virDomainDefPtr vmdef,
}
int
virDomainRNGInsert(virDomainDefPtr def,
virDomainRNGDefPtr rng,
bool inplace)
{
if (inplace)
return VIR_APPEND_ELEMENT_INPLACE(def->rngs, def->nrngs, rng);
else
return VIR_APPEND_ELEMENT(def->rngs, def->nrngs, rng);
}
ssize_t
virDomainRNGFind(virDomainDefPtr def,
virDomainRNGDefPtr rng)
......
......@@ -2909,9 +2909,6 @@ virDomainChrDefPtr
virDomainChrRemove(virDomainDefPtr vmdef,
virDomainChrDefPtr chr);
int virDomainRNGInsert(virDomainDefPtr def,
virDomainRNGDefPtr rng,
bool inplace);
ssize_t virDomainRNGFind(virDomainDefPtr def, virDomainRNGDefPtr rng);
virDomainRNGDefPtr virDomainRNGRemove(virDomainDefPtr def, size_t idx);
......
......@@ -424,7 +424,6 @@ virDomainRedirdevBusTypeToString;
virDomainRNGBackendTypeToString;
virDomainRNGDefFree;
virDomainRNGFind;
virDomainRNGInsert;
virDomainRNGModelTypeToString;
virDomainRNGRemove;
virDomainRunningReasonTypeFromString;
......
......@@ -7914,7 +7914,7 @@ qemuDomainAttachDeviceConfig(virQEMUCapsPtr qemuCaps,
return -1;
}
if (virDomainRNGInsert(vmdef, dev->data.rng, false) < 0)
if (VIR_APPEND_ELEMENT(vmdef->rngs, vmdef->nrngs, dev->data.rng) < 0)
return -1;
dev->data.rng = NULL;
......
......@@ -1666,8 +1666,7 @@ qemuDomainAttachRNGDevice(virQEMUDriverPtr driver,
goto cleanup;
}
if (virDomainRNGInsert(vm->def, rng, true) < 0)
goto audit;
ignore_value(VIR_APPEND_ELEMENT_INPLACE(vm->def->rngs, vm->def->nrngs, rng));
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册