aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-12 19:57:12 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-12 19:57:12 +0000
commit04eeb8b6d68ed314746856c813ce6fa8bc1a95df (patch)
tree46b648594c2e0c1db08685d4396e373b8d53cc87 /block.c
parentAdd specialized block driver scsi generic API (Avi Kivity) (diff)
downloadqemu-kvm-04eeb8b6d68ed314746856c813ce6fa8bc1a95df.tar.gz
qemu-kvm-04eeb8b6d68ed314746856c813ce6fa8bc1a95df.tar.bz2
qemu-kvm-04eeb8b6d68ed314746856c813ce6fa8bc1a95df.zip
Add internal scsi generic block API (Avi Kivity)
Add an internal API for the generic block layer to send scsi generic commands to block format driver. This means block format drivers no longer need to consider overloaded nb_sectors parameters. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6823 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block.c b/block.c
index 39b27b270..e2a75b0f8 100644
--- a/block.c
+++ b/block.c
@@ -1678,22 +1678,22 @@ int bdrv_ioctl(BlockDriverState *bs, unsigned long int req, void *buf)
int bdrv_sg_send_command(BlockDriverState *bs, void *buf, int count)
{
- return bdrv_pwrite(bs, -1, buf, count);
+ return bs->drv->bdrv_sg_send_command(bs, buf, count);
}
int bdrv_sg_recv_response(BlockDriverState *bs, void *buf, int count)
{
- return bdrv_pread(bs, -1, buf, count);
+ return bs->drv->bdrv_sg_recv_response(bs, buf, count);
}
BlockDriverAIOCB *bdrv_sg_aio_read(BlockDriverState *bs, void *buf, int count,
BlockDriverCompletionFunc *cb, void *opaque)
{
- return bdrv_aio_read(bs, 0, buf, -(int64_t)count, cb, opaque);
+ return bs->drv->bdrv_sg_aio_read(bs, buf, count, cb, opaque);
}
BlockDriverAIOCB *bdrv_sg_aio_write(BlockDriverState *bs, void *buf, int count,
BlockDriverCompletionFunc *cb, void *opaque)
{
- return bdrv_aio_write(bs, 0, buf, -(int64_t)count, cb, opaque);
+ return bs->drv->bdrv_sg_aio_write(bs, buf, count, cb, opaque);
}