[Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-11 Thread Stefan Berger
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

Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-13 Thread Stefan Berger
On 10/11/2017 03:47 PM, Stefan Berger wrote: 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 a

Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-13 Thread Marc-André Lureau
Hi On Wed, Oct 11, 2017 at 9:47 PM, Stefan Berger wrote: > 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

Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-13 Thread Peter Maydell
On 13 October 2017 at 12:14, Marc-André Lureau wrote: > Hi > > On Wed, Oct 11, 2017 at 9:47 PM, Stefan Berger > wrote: >> 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

Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-13 Thread Stefan Berger
On 10/13/2017 12:12 PM, Peter Maydell wrote: On 13 October 2017 at 12:14, Marc-André Lureau wrote: Hi On Wed, Oct 11, 2017 at 9:47 PM, Stefan Berger wrote: EBADMSG was only added to OpenBSD very recently. To make QEMU compilable on older OpenBSD versions use EMSGSIZE instead when a mismatch

Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-15 Thread Peter Maydell
On 13 October 2017 at 17:36, Stefan Berger wrote: > This is NOT test code. It's determining whether the external TPM is a TPM > 1.2 or TPM 2 emulation. This avoids having to start QEMU with a '--tpm2' > parmeter equivalent as well as the external emulator. Passing this to the > external emulator i