aboutsummaryrefslogtreecommitdiff
path: root/block/cloop.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-06-20 18:24:02 +0200
committerKevin Wolf <kwolf@redhat.com>2016-07-05 16:46:27 +0200
commitcf2ab8fc345c34f8671fade9230746610e4fc340 (patch)
tree12cde9139b26e6ddc0f0e041bc48a81489246e8e /block/cloop.c
parent18d51c4bac9d96302035de0faa11e3df98358f45 (diff)
block: Convert bdrv_pread(v) to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/cloop.c')
-rw-r--r--block/cloop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/cloop.c b/block/cloop.c
index 8f046e1498..7b75f7ef7b 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -69,7 +69,7 @@ static int cloop_open(BlockDriverState *bs, QDict *options, int flags,
bs->read_only = true;
/* read header */
- ret = bdrv_pread(bs->file->bs, 128, &s->block_size, 4);
+ ret = bdrv_pread(bs->file, 128, &s->block_size, 4);
if (ret < 0) {
return ret;
}
@@ -95,7 +95,7 @@ static int cloop_open(BlockDriverState *bs, QDict *options, int flags,
return -EINVAL;
}
- ret = bdrv_pread(bs->file->bs, 128 + 4, &s->n_blocks, 4);
+ ret = bdrv_pread(bs->file, 128 + 4, &s->n_blocks, 4);
if (ret < 0) {
return ret;
}
@@ -126,7 +126,7 @@ static int cloop_open(BlockDriverState *bs, QDict *options, int flags,
return -ENOMEM;
}
- ret = bdrv_pread(bs->file->bs, 128 + 4 + 4, s->offsets, offsets_size);
+ ret = bdrv_pread(bs->file, 128 + 4 + 4, s->offsets, offsets_size);
if (ret < 0) {
goto fail;
}
@@ -211,7 +211,7 @@ static inline int cloop_read_block(BlockDriverState *bs, int block_num)
int ret;
uint32_t bytes = s->offsets[block_num + 1] - s->offsets[block_num];
- ret = bdrv_pread(bs->file->bs, s->offsets[block_num],
+ ret = bdrv_pread(bs->file, s->offsets[block_num],
s->compressed_block, bytes);
if (ret != bytes) {
return -1;