aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPankaj Gupta <pankaj.gupta.linux@gmail.com>2020-10-22 13:13:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-10 06:27:17 -0500
commita3a929083b03c839b3c87c461769e605ec79b0a7 (patch)
treeaf4a8b1b6f4aab82f18d96b549a2ebbc4980c43f
parent784106ec98b68cd4c1470a3f92cc46ac3e8926c1 (diff)
downloadqemu-a3a929083b03c839b3c87c461769e605ec79b0a7.zip
qemu-a3a929083b03c839b3c87c461769e605ec79b0a7.tar.gz
qemu-a3a929083b03c839b3c87c461769e605ec79b0a7.tar.bz2
physmem: improve ram size error messages
Ram size mismatch condition logs below message. "Length mismatch: pc.ram: 0x80000000 in != 0x180000000: Invalid argument" This patch improves the readability of error messages. Removed the superflous "in" and changed "Length" to "Size". Signed-off-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com> Reported-by: Li Zhang <li.zhang@cloud.ionos.com> Message-Id: <20201022111302.8105-1-pankaj.gupta.linux@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--softmmu/physmem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 0b31be2..dd60ff7 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -1756,15 +1756,15 @@ int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
if (!(block->flags & RAM_RESIZEABLE)) {
error_setg_errno(errp, EINVAL,
- "Length mismatch: %s: 0x" RAM_ADDR_FMT
- " in != 0x" RAM_ADDR_FMT, block->idstr,
+ "Size mismatch: %s: 0x" RAM_ADDR_FMT
+ " != 0x" RAM_ADDR_FMT, block->idstr,
newsize, block->used_length);
return -EINVAL;
}
if (block->max_length < newsize) {
error_setg_errno(errp, EINVAL,
- "Length too large: %s: 0x" RAM_ADDR_FMT
+ "Size too large: %s: 0x" RAM_ADDR_FMT
" > 0x" RAM_ADDR_FMT, block->idstr,
newsize, block->max_length);
return -EINVAL;