On Sun, 4 Jul 2021 at 18:07, Philippe Mathieu-Daudé <f4...@amsat.org> wrote:
>
> The spec only defines a set of host errno to translate to guest.
> Complete the current errno set, and log unexpected errno (they
> are currently replaced by EINVAL, which is dubious, but we don't
> modify this).
>
> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
> ---

This commit adds the definition of the guest EINVAL:

> +    uhi_errno_insert(EINVAL,        22);
> @@ -126,6 +162,8 @@ static int errno_mips(int host_errno)
>                                       NULL, &uhi_errno)) {
>          return GPOINTER_TO_INT(uhi_errno);
>      }
> +    qemu_log("semihosting: Illegal UHI errno: %d\n", host_errno);
> +
>      return EINVAL; /* Not reachable per the specification */
>  }

...but it leaves the default case returning the host EINVAL.

thanks
-- PMM

Reply via email to