mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
storage_conf: Improve error messages
virStoragePoolDefParseSource: * Better error message virStoragePoolObjLoad: * Break the line line
This commit is contained in:
parent
1c6fe3fa3a
commit
ec2b81c68b
@ -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,
|
|||||||
|
|
||||||
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user