Skip to contentSkip to conversation

Show length mismatch error is hex

PATCH Applied Alex Bligh 2 participants 2 messages Jul 19, 2014 – Aug 2, 2014

lore
Share & tools
lore

Alex Bligh

author
#0 lore raw

PATCH 1/1 Show length mismatch error is hex

When live migrate fails due to a section length mismatch we currently see an error message like:

Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 10000 in != 20000

The section lengths are in fact in hex, so this should read

Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 0x10000 in != 0x20000

Correct the error string to reflect this.

---
 arch_init.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch_init.c +2 -2
index 8ddaf35..28ece76 100644
@@ -1072,8 +1072,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
                 QTAILQ_FOREACH(block, &ram_list.blocks, next) {
                     if (!strncmp(id, block->idstr, sizeof(id))) {
                         if (block->length != length) {
-                            error_report("Length mismatch: %s: " RAM_ADDR_FMT
-                                         " in != " RAM_ADDR_FMT, id, length,
+                            error_report("Length mismatch: %s: 0x" RAM_ADDR_FMT
+                                         " in != 0x" RAM_ADDR_FMT, id, length,
                                          block->length);
                             ret =  -EINVAL;
                         }
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 10 lines · Alex Bligh

When live migrate fails due to a section length mismatch we currently see an error message like:

Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 10000 in != 20000

The section lengths are in fact in hex, so this should read

Length mismatch: 0000:00:03.0/virtio-net-pci.rom: 0x10000 in != 0x20000

Correct the error string to reflect this.

Applied to -trivial, thank you!

/mjt