提交 76394174 编写于 作者: P Peter Krempa

conf: disallow empty cpuset for emulatorpin

It's disallowed in the API.
上级 31b782a1
...@@ -14275,8 +14275,18 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node) ...@@ -14275,8 +14275,18 @@ virDomainEmulatorPinDefParseXML(xmlNodePtr node)
return NULL; return NULL;
} }
ignore_value(virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN)); if (virBitmapParse(tmp, 0, &def, VIR_DOMAIN_CPUMASK_LEN) < 0)
goto cleanup;
if (virBitmapIsAllClear(def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Invalid value of 'cpuset': %s"), tmp);
virBitmapFree(def);
def = NULL;
goto cleanup;
}
cleanup:
VIR_FREE(tmp); VIR_FREE(tmp);
return def; return def;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册