diff --git a/vl.c b/vl.c index 364931338072b9a20731b6fa80059748c7da636e..232072b2610138deda7b980e48334df46b679e0c 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;