mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virDomainIOThreadPinDefParseXML: Use virXMLProp*
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
762c7822b9
commit
124357c17a
@ -17135,24 +17135,10 @@ virDomainIOThreadPinDefParseXML(xmlNodePtr node,
|
|||||||
g_autofree char *tmp = NULL;
|
g_autofree char *tmp = NULL;
|
||||||
g_autoptr(virBitmap) cpumask = NULL;
|
g_autoptr(virBitmap) cpumask = NULL;
|
||||||
|
|
||||||
if (!(tmp = virXMLPropString(node, "iothread"))) {
|
if (virXMLPropUInt(node, "iothread", 10,
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NONZERO,
|
||||||
_("missing iothread id in iothreadpin"));
|
&iothreadid) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
if (virStrToLong_uip(tmp, NULL, 10, &iothreadid) < 0) {
|
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
|
||||||
_("invalid setting for iothread '%s'"), tmp);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
VIR_FREE(tmp);
|
|
||||||
|
|
||||||
if (iothreadid == 0) {
|
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
|
||||||
_("zero is an invalid iothread id value"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(iothrid = virDomainIOThreadIDFind(def, iothreadid))) {
|
if (!(iothrid = virDomainIOThreadIDFind(def, iothreadid))) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user