qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD
Date: Wed, 11 Oct 2017 14:00:48 +0100

On 11 October 2017 at 13:59, Stefan Berger <address@hidden> wrote:
> EMSGSIZE was only added to OpenBSD very recently. To make QEMU

Do you mean "EBADMSG" in this line?

> compileable on older OpenBSD versions use EMSGSIZE instead when
> a mismatch between number of received bytes and message size in-
> dicated in the header was found.
>
> Signed-off-by: Stefan Berger <address@hidden>
> ---
>  hw/tpm/tpm_util.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
> index fb929f6..1129155 100644
> --- a/hw/tpm/tpm_util.c
> +++ b/hw/tpm/tpm_util.c
> @@ -91,7 +91,7 @@ static int tpm_util_test(int fd,
>      resp = (struct tpm_resp_hdr *)buf;
>      /* check the header */
>      if (be32_to_cpu(resp->len) != n) {
> -        return EBADMSG;
> +        return EMSGSIZE;
>      }
>
>      *return_tag = be16_to_cpu(resp->tag);
> --
> 2.5.5
>

thanks
-- PMM



reply via email to

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