aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:48:01 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-06 10:48:01 -0500
commit5efb397f877fc3002c8bc764f4656f4761bd965d (patch)
tree4ef1809f16a7f30f237840cdbfc5521afd4e8316 /hw/scsi-generic.c
parentfb787f81e749fde8c74548f9db1472eb321b9a0c (diff)
parent33b1db1c8888b77e06c720ebef0482ed598eb384 (diff)
Merge remote branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 3915e7844e..a8b4176d80 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -474,6 +474,15 @@ static int scsi_generic_initfn(SCSIDevice *dev)
return -1;
}
+ if (bdrv_get_on_error(s->bs, 0) != BLOCK_ERR_STOP_ENOSPC) {
+ error_report("Device doesn't support drive option werror");
+ return -1;
+ }
+ if (bdrv_get_on_error(s->bs, 1) != BLOCK_ERR_REPORT) {
+ error_report("Device doesn't support drive option rerror");
+ return -1;
+ }
+
/* check we are using a driver managing SG_IO (version 3 and after */
if (bdrv_ioctl(s->bs, SG_GET_VERSION_NUM, &sg_version) < 0 ||
sg_version < 30000) {