]> git.proxmox.com Git - mirror_qemu.git/commit
block: Make blk_{pread,pwrite}() return 0 on success
authorAlberto Faria <afaria@redhat.com>
Tue, 5 Jul 2022 16:15:09 +0000 (17:15 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 12 Jul 2022 10:14:56 +0000 (12:14 +0200)
commitbf5b16fa401633475d21d69c66532f5b29e8433d
tree60779d913b400906135b6bbce90d6128a52ac3ef
parent92529251d2333ea07176cdbd7273483064ba5a7b
block: Make blk_{pread,pwrite}() return 0 on success

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.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Message-Id: <20220705161527.1054072-2-afaria@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
12 files changed:
block.c
block/block-backend.c
block/qcow.c
hw/block/m25p80.c
hw/misc/mac_via.c
hw/misc/sifive_u_otp.c
hw/nvram/eeprom_at24c.c
hw/nvram/spapr_nvram.c
hw/ppc/pnv_pnor.c
qemu-img.c
qemu-io-cmds.c
tests/unit/test-block-iothread.c