提交 ec2b81c6 编写于 作者: O Osier Yang

storage_conf: Improve error messages

virStoragePoolDefParseSource:
  * Better error message

virStoragePoolObjLoad:
  * Break the line line
上级 1c6fe3fa
...@@ -531,7 +531,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, ...@@ -531,7 +531,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
source->name = virXPathString("string(./name)", ctxt); source->name = virXPathString("string(./name)", ctxt);
if (pool_type == VIR_STORAGE_POOL_RBD && source->name == NULL) { if (pool_type == VIR_STORAGE_POOL_RBD && source->name == NULL) {
virReportError(VIR_ERR_XML_ERROR, "%s", virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing mandatory 'name' field for RBD pool name")); _("element 'name' is mandatory for RBD pool"));
goto cleanup; goto cleanup;
} }
...@@ -1697,7 +1697,8 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools, ...@@ -1697,7 +1697,8 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools,
if (!virFileMatchesNameSuffix(file, def->name, ".xml")) { if (!virFileMatchesNameSuffix(file, def->name, ".xml")) {
virReportError(VIR_ERR_XML_ERROR, virReportError(VIR_ERR_XML_ERROR,
_("Storage pool config filename '%s' does not match pool name '%s'"), _("Storage pool config filename '%s' does "
"not match pool name '%s'"),
path, def->name); path, def->name);
virStoragePoolDefFree(def); virStoragePoolDefFree(def);
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册