]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix the wrong expression
authorOsier Yang <jyang@redhat.com>
Mon, 22 Apr 2013 11:40:19 +0000 (19:40 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 22 Apr 2013 10:56:20 +0000 (18:56 +0800)
Wrong use of the parentheses causes "rc" always having a boolean value,
either "1" or "0", and thus we can't get the detailed error message
when it fails:

Before (I only have 1 node):
% virsh numatune f18 --nodeset 12
error: Unable to change numa parameters
error: unable to set numa tunable: Unknown error -1

After:
virsh numatune f18 --nodeset 12
error: Unable to change numa parameters
error: unable to set numa tunable: Invalid argument

src/qemu/qemu_driver.c

index cee5557d8570d4c03890a6f53627cd5caa807dfe..0de7ffda76496cc2cc54174d49dfdec231f87970 100644 (file)
@@ -7470,7 +7470,7 @@ qemuDomainSetNumaParameters(virDomainPtr dom,
                     continue;
                 }
 
-                if ((rc = virCgroupSetCpusetMems(priv->cgroup, nodeset_str) != 0)) {
+                if ((rc = virCgroupSetCpusetMems(priv->cgroup, nodeset_str)) != 0) {
                     virReportSystemError(-rc, "%s",
                                          _("unable to set numa tunable"));
                     virBitmapFree(nodeset);