[libvirt PATCH 04/10] virDomainVcpuPinDefParseXML: Use virXMLProp*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b8ac399f5c..e95be17989 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17273,17 +17273,8 @@ virDomainVcpuPinDefParseXML(virDomainDef *def,
     unsigned int vcpuid;
     g_autofree char *tmp = NULL;
 
-    if (!(tmp = virXMLPropString(node, "vcpu"))) {
-        virReportError(VIR_ERR_XML_ERROR, "%s", _("missing vcpu id in vcpupin"));
+    if (virXMLPropUInt(node, "vcpu", 10, VIR_XML_PROP_REQUIRED, &vcpuid) < 0)
         return -1;
-    }
-
-    if (virStrToLong_uip(tmp, NULL, 10, &vcpuid) < 0) {
-        virReportError(VIR_ERR_XML_ERROR,
-                       _("invalid setting for vcpu '%s'"), tmp);
-        return -1;
-    }
-    VIR_FREE(tmp);
 
     if (!(vcpu = virDomainDefGetVcpu(def, vcpuid))) {
         VIR_WARN("Ignoring vcpupin for missing vcpus");
-- 
2.26.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux