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)
commit620f862e1c3d0862923997c8d6632c5916da997c
treebbc7cfc1e33048a2e202342647fd486a5085d1ce
parentbd6c9a617d969752c9d3663f6ad29ae6d6d6c402
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