hw/char/pl011: Use '0x' prefix when logging hex numbers
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Feb 2019 18:17:46 +0000 (18:17 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 21 Feb 2019 18:17:46 +0000 (18:17 +0000)
The pl011 logs when the guest makes a bad access. It prints
the address offset in hex but confusingly omits the '0x'
prefix; add it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
hw/char/pl011.c

index 29f4e5eb2249679b3b4797b5326da5c906c97e88..e5dd448f8546f42211c150fcf53885c95bd0ca5c 100644 (file)
@@ -143,7 +143,7 @@ static uint64_t pl011_read(void *opaque, hwaddr offset,
         break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
-                      "pl011_read: Bad offset %x\n", (int)offset);
+                      "pl011_read: Bad offset 0x%x\n", (int)offset);
         r = 0;
         break;
     }
@@ -232,7 +232,7 @@ static void pl011_write(void *opaque, hwaddr offset,
         break;
     default:
         qemu_log_mask(LOG_GUEST_ERROR,
-                      "pl011_write: Bad offset %x\n", (int)offset);
+                      "pl011_write: Bad offset 0x%x\n", (int)offset);
     }
 }