block: Make blk_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: Hanna Reitz <hreitz@redhat.com> Message-Id: <20220705161527.1054072-6-afaria@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
parent
40fb4861b2
commit
7d252ba5ca
@ -129,7 +129,7 @@ static inline int coroutine_fn blk_co_pread(BlockBackend *blk, int64_t offset,
|
||||
}
|
||||
|
||||
static inline int coroutine_fn blk_co_pwrite(BlockBackend *blk, int64_t offset,
|
||||
int64_t bytes, void *buf,
|
||||
int64_t bytes, const void *buf,
|
||||
BdrvRequestFlags flags)
|
||||
{
|
||||
QEMUIOVector qiov = QEMU_IOVEC_INIT_BUF(qiov, buf, bytes);
|
||||
|
Loading…
Reference in New Issue
Block a user