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 <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
John Ferlan 2018-12-07 11:07:32 -05:00
parent dd45c2710f
commit 4f0854e7df
1 changed files with 2 additions and 1 deletions

View 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;
}
}