From: John Ferlan Date: Fri, 7 Dec 2018 16:07:32 +0000 (-0500) Subject: conf: Add the size of failed max_memory in error X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4f0854e7dfdd4f7206008439f3a8d15bd373a776;p=libvirt.git conf: Add the size of failed max_memory in error 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 ACKed-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0c7e69c12e..89f444b967 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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; } }