]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: Add the size of failed max_memory in error
authorJohn Ferlan <jferlan@redhat.com>
Fri, 7 Dec 2018 16:07:32 +0000 (11:07 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 12 Dec 2018 19:34:04 +0000 (14:34 -0500)
If virDomainDefCompatibleDevice fails because there is insufficient
domain def->mem.max_memory, then let's also print out that value in
the error message.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c

index 0c7e69c12ee7df34b22eacaafc9cdaf16b101a02..89f444b967667494f51b33632d3eddb212f8b6eb 100644 (file)
@@ -28926,7 +28926,8 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
         if ((virDomainDefGetMemoryTotal(def) + sz) > def->mem.max_memory) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("Attaching memory device with size '%llu' would "
-                             "exceed domain's maxMemory config"), sz);
+                             "exceed domain's maxMemory config size '%llu'"),
+                           sz, def->mem.max_memory);
             return -1;
         }
     }