]> git.proxmox.com Git - qemu.git/commitdiff
ioport: Improve error output
authorAndreas Färber <andreas.faerber@web.de>
Sun, 6 Mar 2011 14:48:13 +0000 (15:48 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 6 Mar 2011 20:01:32 +0000 (21:01 +0100)
When failing due to conflicting I/O port registrations,
include the offending I/O port address in the message.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ioport.c

index aa4188a40f195c721009a328e24e43bfde91f6a4..2e971fa3e5cd89ff3c8c175214e15d7632c71b42 100644 (file)
--- a/ioport.c
+++ b/ioport.c
@@ -149,7 +149,8 @@ int register_ioport_read(pio_addr_t start, int length, int size,
     for(i = start; i < start + length; i += size) {
         ioport_read_table[bsize][i] = func;
         if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
-            hw_error("register_ioport_read: invalid opaque");
+            hw_error("register_ioport_read: invalid opaque for address 0x%x",
+                     i);
         ioport_opaque[i] = opaque;
     }
     return 0;
@@ -168,7 +169,8 @@ int register_ioport_write(pio_addr_t start, int length, int size,
     for(i = start; i < start + length; i += size) {
         ioport_write_table[bsize][i] = func;
         if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
-            hw_error("register_ioport_write: invalid opaque");
+            hw_error("register_ioport_write: invalid opaque for address 0x%x",
+                     i);
         ioport_opaque[i] = opaque;
     }
     return 0;