summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorAlberto Faria2022-06-09 17:27:39 +0200
committerHanna Reitz2022-07-12 12:14:56 +0200
commitca71a64ee52eb0954541137026288970cc8213f7 (patch)
tree138b4c7ee2f3e774a2df66101058e234e4605dc4 /include/block
parentcrypto: Make block callbacks return 0 on success (diff)
downloadqemu-ca71a64ee52eb0954541137026288970cc8213f7.tar.gz
qemu-ca71a64ee52eb0954541137026288970cc8213f7.tar.xz
qemu-ca71a64ee52eb0954541137026288970cc8213f7.zip
block: Make bdrv_co_pwrite() take a const buffer
It does not mutate the buffer. Signed-off-by: Alberto Faria <afaria@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20220609152744.3891847-6-afaria@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int-io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block_int-io.h b/include/block/block_int-io.h
index ded29e7494..5474293c4f 100644
--- a/include/block/block_int-io.h
+++ b/include/block/block_int-io.h
@@ -65,7 +65,7 @@ static inline int coroutine_fn bdrv_co_pread(BdrvChild *child,
}
static inline int coroutine_fn bdrv_co_pwrite(BdrvChild *child,
- int64_t offset, unsigned int bytes, void *buf, BdrvRequestFlags flags)
+ int64_t offset, unsigned int bytes, const void *buf, BdrvRequestFlags flags)
{
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
IO_CODE();