aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 16:10:43 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-12-24 16:10:43 +0000
commit985a03b0ce38275c2ea355bf29b6d6b5779dbb56 (patch)
tree22eac188d157768555e44f33f2eca5be2508c10b /block.c
parent1b0889958e875df85c7b2353498ed2cac16415ce (diff)
downloadqemu-985a03b0ce38275c2ea355bf29b6d6b5779dbb56.zip
qemu-985a03b0ce38275c2ea355bf29b6d6b5779dbb56.tar.gz
qemu-985a03b0ce38275c2ea355bf29b6d6b5779dbb56.tar.bz2
Real SCSI device passthrough (v4), by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/block.c b/block.c
index a3299b8..0f8ad7b 100644
--- a/block.c
+++ b/block.c
@@ -786,6 +786,11 @@ int bdrv_is_read_only(BlockDriverState *bs)
return bs->read_only;
}
+int bdrv_is_sg(BlockDriverState *bs)
+{
+ return bs->sg;
+}
+
/* XXX: no longer used */
void bdrv_set_change_cb(BlockDriverState *bs,
void (*change_cb)(void *opaque), void *opaque)
@@ -1394,3 +1399,14 @@ void bdrv_set_locked(BlockDriverState *bs, int locked)
drv->bdrv_set_locked(bs, locked);
}
}
+
+/* needed for generic scsi interface */
+
+int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
+{
+ BlockDriver *drv = bs->drv;
+
+ if (drv && drv->bdrv_ioctl)
+ return drv->bdrv_ioctl(bs, req, buf);
+ return -ENOTSUP;
+}