Commit 88fdf56f2a5aa44c7bb71edeb7398bab9e975e02
1 parent
b22205f2
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
Showing
1 changed file
with
5 additions
and
7 deletions
vl.c
... | ... | @@ -324,13 +324,13 @@ int register_ioport_read(int start, int length, int size, |
324 | 324 | } else if (size == 4) { |
325 | 325 | bsize = 2; |
326 | 326 | } else { |
327 | - fprintf(stderr, "register_ioport_read: invalid size\n"); | |
327 | + hw_error("register_ioport_read: invalid size"); | |
328 | 328 | return -1; |
329 | 329 | } |
330 | 330 | for(i = start; i < start + length; i += size) { |
331 | 331 | ioport_read_table[bsize][i] = func; |
332 | 332 | if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) |
333 | - fprintf(stderr, "register_ioport_read: invalid opaque\n"); | |
333 | + hw_error("register_ioport_read: invalid opaque"); | |
334 | 334 | ioport_opaque[i] = opaque; |
335 | 335 | } |
336 | 336 | return 0; |
... | ... | @@ -349,15 +349,13 @@ int register_ioport_write(int start, int length, int size, |
349 | 349 | } else if (size == 4) { |
350 | 350 | bsize = 2; |
351 | 351 | } else { |
352 | - fprintf(stderr, "register_ioport_write: invalid size\n"); | |
352 | + hw_error("register_ioport_write: invalid size"); | |
353 | 353 | return -1; |
354 | 354 | } |
355 | 355 | for(i = start; i < start + length; i += size) { |
356 | 356 | ioport_write_table[bsize][i] = func; |
357 | - if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) { | |
358 | - fprintf(stderr, "register_ioport_write: invalid opaque\n"); | |
359 | - return -1; | |
360 | - } | |
357 | + if (ioport_opaque[i] != NULL && ioport_opaque[i] != opaque) | |
358 | + hw_error("register_ioport_write: invalid opaque"); | |
361 | 359 | ioport_opaque[i] = opaque; |
362 | 360 | } |
363 | 361 | return 0; | ... | ... |