From: Osier Yang Date: Mon, 22 Apr 2013 11:40:19 +0000 (+0800) Subject: qemu: Fix the wrong expression X-Git-Tag: v1.0.5-rc1~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a71ec98841c825dfb7e9b648dd85f5140f29d090;p=thirdparty%2Flibvirt.git qemu: Fix the wrong expression 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cee5557d85..0de7ffda76 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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);