qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD
Date: Fri, 13 Oct 2017 17:12:10 +0100

On 13 October 2017 at 12:14, Marc-André Lureau
<address@hidden> wrote:
> Hi
>
> On Wed, Oct 11, 2017 at 9:47 PM, Stefan Berger
> <address@hidden> 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 all other errnos in the same functions to
>> return the negative errno.
>>
>> Signed-off-by: Stefan Berger <address@hidden>
>
> Reviewed-by: Marc-André Lureau <address@hidden>
>
>
> Looks good to me,
> but given that the return value isn't used, perhaps you could have
> changed the function to return a bool success instead?

AIUI this is just test code, so we probably don't gain too much
from extensively bikeshedding it. (Having said that, I can't
resist asking why it's not in tests/ :-))

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]