scsi: Reject unimplemented error actions
authorMarkus Armbruster <armbru@redhat.com>
Thu, 27 May 2010 18:02:28 +0000 (20:02 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 6 Jul 2010 15:05:49 +0000 (17:05 +0200)
commitd34689a196fda52983189bb5f7738bfe5fe8f4a6
treebbc7cfc1e33048a2e202342647fd486a5085d1ce
parentfe111ae24da627344bb5f589ba0dc221c8a98783
scsi: Reject unimplemented error actions

drive_init() doesn't permit rerror for if=scsi, but that's worthless:
we get it via if=none and -device.

Moreover, scsi-generic doesn't support werror.  Since drive_init()
doesn't catch that, option werror was silently ignored even with
if=scsi.

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/scsi-disk.c
hw/scsi-generic.c