]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage_conf: Improve error messages
authorOsier Yang <jyang@redhat.com>
Wed, 22 May 2013 12:05:21 +0000 (20:05 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 29 May 2013 10:08:42 +0000 (18:08 +0800)
virStoragePoolDefParseSource:
  * Better error message

virStoragePoolObjLoad:
  * Break the line line

src/conf/storage_conf.c

index d21625735755f2d264d101408981436812891692..b9215220eecc77921c45ef215e1db5763210d394 100644 (file)
@@ -531,7 +531,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt,
     source->name = virXPathString("string(./name)", ctxt);
     if (pool_type == VIR_STORAGE_POOL_RBD && source->name == NULL) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("missing mandatory 'name' field for RBD pool name"));
+                       _("element 'name' is mandatory for RBD pool"));
         goto cleanup;
     }
 
@@ -1697,7 +1697,8 @@ virStoragePoolObjLoad(virStoragePoolObjListPtr pools,
 
     if (!virFileMatchesNameSuffix(file, def->name, ".xml")) {
         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);
         virStoragePoolDefFree(def);
         return NULL;