} else if (size == 4) {
bsize = 2;
} else {
- hw_error("register_ioport_read: invalid size");
+ fprintf(stderr, "register_ioport_read: invalid size\n");
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)
- hw_error("register_ioport_read: invalid opaque");
+ fprintf(stderr, "register_ioport_read: invalid opaque\n");
ioport_opaque[i] = opaque;
}
return 0;
} else if (size == 4) {
bsize = 2;
} else {
- hw_error("register_ioport_write: invalid size");
+ fprintf(stderr, "register_ioport_write: invalid size\n");
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)
- hw_error("register_ioport_write: invalid opaque");
+ if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) {
+ fprintf(stderr, "register_ioport_write: invalid opaque\n");
+ return -1;
+ }
ioport_opaque[i] = opaque;
}
return 0;