]> git.ipfire.org Git - thirdparty/qemu.git/commit
tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Wed, 11 Oct 2017 12:52:43 +0000 (08:52 -0400)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Fri, 13 Oct 2017 11:34:32 +0000 (07:34 -0400)
commit98979cdca44ba0e21055ee7736694aa5ebb54347
treeb0cb1aac20a748b64ead5f8ac4b7ff993c094ec4
parentf90ea7ba7c5ae7010ee0ce062207ae42530f57d6
tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

EBADMSG was only added to OpenBSD very recently. To make QEMU compilable
on older OpenBSD versions use EMSGSIZE instead when a mismatch between
number of received bytes and message size indicated in the header was
found.

Return -EMSGSIZE and convert all other errnos in the same functions to
return the negative errno.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
hw/tpm/tpm_util.c