]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain_conf: Replace the name string with 'vcpu' if it is 'vcpus'
authorLiao Pingfang <liao.pingfang@zte.com.cn>
Wed, 1 Jul 2020 23:39:40 +0000 (07:39 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Jul 2020 14:30:15 +0000 (16:30 +0200)
If the name is 'vcpus', we will get 'vcpussched' instead of 'vcpusched'
in the error message as following:

... 19155 : vcpussched attributes 'vcpus' must not overlap

So we use 'vcpu' to replace 'vcpus'.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 2f4528d336a892f289d78a0a38b50356f8810e0d..e9803b85143e33b9d9e4920c7b7387cf668316df 100644 (file)
@@ -19981,7 +19981,7 @@ virDomainThreadSchedParseHelper(xmlNodePtr node,
         if (sched->policy != VIR_PROC_POLICY_NONE) {
             virReportError(VIR_ERR_XML_DETAIL,
                            _("%ssched attributes 'vcpus' must not overlap"),
-                           name);
+                           STREQ(name, "vcpus") ? "vcpu" : name);
             return -1;
         }