summaryrefslogtreecommitdiff
path: root/block/vpc.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/vpc.c
parent18d51c4bac9d96302035de0faa11e3df98358f45 (diff)
downloadqemu-cf2ab8fc345c34f8671fade9230746610e4fc340.tar.gz
qemu-cf2ab8fc345c34f8671fade9230746610e4fc340.tar.bz2
qemu-cf2ab8fc345c34f8671fade9230746610e4fc340.zip
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/vpc.c')
-rw-r--r--block/vpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/vpc.c b/block/vpc.c
index 076a7ce399..9528637fca 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -237,7 +237,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
goto fail;
}
- ret = bdrv_pread(bs->file->bs, 0, s->footer_buf, HEADER_SIZE);
+ ret = bdrv_pread(bs->file, 0, s->footer_buf, HEADER_SIZE);
if (ret < 0) {
error_setg(errp, "Unable to read VHD header");
goto fail;
@@ -257,7 +257,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
}
/* If a fixed disk, the footer is found only at the end of the file */
- ret = bdrv_pread(bs->file->bs, offset-HEADER_SIZE, s->footer_buf,
+ ret = bdrv_pread(bs->file, offset-HEADER_SIZE, s->footer_buf,
HEADER_SIZE);
if (ret < 0) {
goto fail;
@@ -328,7 +328,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
}
if (disk_type == VHD_DYNAMIC) {
- ret = bdrv_pread(bs->file->bs, be64_to_cpu(footer->data_offset), buf,
+ ret = bdrv_pread(bs->file, be64_to_cpu(footer->data_offset), buf,
HEADER_SIZE);
if (ret < 0) {
error_setg(errp, "Error reading dynamic VHD header");
@@ -385,7 +385,7 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags,
s->bat_offset = be64_to_cpu(dyndisk_header->table_offset);
- ret = bdrv_pread(bs->file->bs, s->bat_offset, s->pagetable,
+ ret = bdrv_pread(bs->file, s->bat_offset, s->pagetable,
pagetable_size);
if (ret < 0) {
error_setg(errp, "Error reading pagetable");