aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-26 21:11:22 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-26 21:11:22 +0000
commit88fdf56f2a5aa44c7bb71edeb7398bab9e975e02 (patch)
treefe9342037dd3a77cca6f00f98910faf891321fe8 /vl.c
parentErrors while registering ioports are not fatal (Glauber Costa). (diff)
downloadqemu-kvm-88fdf56f2a5aa44c7bb71edeb7398bab9e975e02.tar.gz
qemu-kvm-88fdf56f2a5aa44c7bb71edeb7398bab9e975e02.tar.bz2
qemu-kvm-88fdf56f2a5aa44c7bb71edeb7398bab9e975e02.zip
IO ports registration errors are fatal errors.
Revert previous change that shouldn't have gone in alone (or at all). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4262 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/vl.c b/vl.c
index 364931338..232072b26 100644
--- a/vl.c
+++ b/vl.c
@@ -324,13 +324,13 @@ int register_ioport_read(int start, int length, int size,
} else if (size == 4) {
bsize = 2;
} else {
- fprintf(stderr, "register_ioport_read: invalid size\n");
+ hw_error("register_ioport_read: invalid size");
return -1;
}
for(i = start; i < start + length; i += size) {
ioport_read_table[bsize][i] = func;
if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
- fprintf(stderr, "register_ioport_read: invalid opaque\n");
+ hw_error("register_ioport_read: invalid opaque");
ioport_opaque[i] = opaque;
}
return 0;
@@ -349,15 +349,13 @@ int register_ioport_write(int start, int length, int size,
} else if (size == 4) {
bsize = 2;
} else {
- fprintf(stderr, "register_ioport_write: invalid size\n");
+ hw_error("register_ioport_write: invalid size");
return -1;
}
for(i = start; i < start + length; i += size) {
ioport_write_table[bsize][i] = func;
- if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) {
- fprintf(stderr, "register_ioport_write: invalid opaque\n");
- return -1;
- }
+ if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque)
+ hw_error("register_ioport_write: invalid opaque");
ioport_opaque[i] = opaque;
}
return 0;