diff options
author | Alberto Faria <afaria@redhat.com> | 2022-06-09 16:27:35 +0100 |
---|---|---|
committer | Hanna Reitz <hreitz@redhat.com> | 2022-07-12 12:14:55 +0200 |
commit | 53fb7844f03241a0e6de2c342c9e1b89df12da4d (patch) | |
tree | 917522c3ce90e4449ffa7fb2a430aa137c22391e /block/bochs.c | |
parent | 9548cbeffffd4253e38570d29b8cff0bf77c998f (diff) |
block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.
Callers were updated using this Coccinelle script:
@@ expression child, offset, buf, bytes; @@
- bdrv_pread(child, offset, buf, bytes)
+ bdrv_pread(child, offset, buf, bytes, 0)
@@ expression child, offset, buf, bytes; @@
- bdrv_pwrite(child, offset, buf, bytes)
+ bdrv_pwrite(child, offset, buf, bytes, 0)
@@ expression child, offset, buf, bytes; @@
- bdrv_pwrite_sync(child, offset, buf, bytes)
+ bdrv_pwrite_sync(child, offset, buf, bytes, 0)
Resulting overly-long lines were then fixed by hand.
Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220609152744.3891847-2-afaria@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'block/bochs.c')
-rw-r--r-- | block/bochs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/bochs.c b/block/bochs.c index 4d68658087..46d0f6a693 100644 --- a/block/bochs.c +++ b/block/bochs.c @@ -116,7 +116,7 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags, return -EINVAL; } - ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs)); + ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs), 0); if (ret < 0) { return ret; } @@ -151,7 +151,7 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags, } ret = bdrv_pread(bs->file, le32_to_cpu(bochs.header), s->catalog_bitmap, - s->catalog_size * 4); + s->catalog_size * 4, 0); if (ret < 0) { goto fail; } @@ -225,7 +225,7 @@ static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num) /* read in bitmap for current extent */ ret = bdrv_pread(bs->file, bitmap_offset + (extent_offset / 8), - &bitmap_entry, 1); + &bitmap_entry, 1, 0); if (ret < 0) { return ret; } |