On 09.06.22 17:27, Alberto Faria wrote:
They currently return the value of their 'bytes' parameter on success.

Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.

The few callers that rely on the previous behavior are adjusted
accordingly by hand.

Signed-off-by: Alberto Faria <afa...@redhat.com>
Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
---
  block/cloop.c                    |  2 +-
  block/crypto.c                   |  4 ++--
  block/dmg.c                      | 10 +++++-----
  block/io.c                       | 10 ++--------
  block/qcow.c                     |  2 +-
  block/qcow2.c                    |  4 ++--
  block/qed.c                      |  7 +------
  block/vdi.c                      |  2 +-
  block/vmdk.c                     |  5 ++---
  tests/unit/test-block-iothread.c |  4 ++--
  10 files changed, 19 insertions(+), 31 deletions(-)

Reviewed-by: Hanna Reitz <hre...@redhat.com>


Reply via email to