OSDN Git Service

crypto: Make block callbacks return 0 on success
authorAlberto Faria <afaria@redhat.com>
Thu, 9 Jun 2022 15:27:38 +0000 (16:27 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 12 Jul 2022 10:14:55 +0000 (12:14 +0200)
commit757dda54b43867936012970a1b457f3d16e7398d
tree2d0997e452b2c62a2bc42a4ab249642cce5076ce
parent353a5d84b25c335b259f37c4f43dad96e6d60ba8
crypto: Make block callbacks return 0 on success

They currently return the value of their headerlen/buflen parameter on
success. Returning 0 instead makes it clear that short reads/writes are
not possible.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220609152744.3891847-5-afaria@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
block/crypto.c
block/qcow2.c
crypto/block-luks.c
crypto/block.c
include/crypto/block.h
tests/unit/test-crypto-block.c