fdc: Reject unimplemented error actions
commitb47b35250fbfa062aedf6ab6e5faab84c4a76f4f
authorMarkus Armbruster <armbru@redhat.com>
Thu, 27 May 2010 18:06:12 +0000 (27 20:06 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 6 Jul 2010 15:05:49 +0000 (6 17:05 +0200)
tree82637de6701c3a0d1b76d8e178aaa048f79479f2
parent65d21bc73bda6515fd9b4ff5b2e90454f7a0b419
fdc: Reject unimplemented error actions

drive_init() doesn't permit them for if=floppy, but that's worthless:
we get them via if=none and -global.

This can make device initialization fail.  Since all callers of
fdctrl_init_isa() ignore its value, change it to die instead of
returning failure.  Without this, some callers would ignore the
failure, and others would crash.

Wart: unlike drive_init(), we don't reject the default action when
it's explicitly specified.  That's because we can't distinguish "no
rerror option" from "rerror=report", or "no werror" from
"rerror=enospc".  Left for another day.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/fdc.c