qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH 11/13] 9p: darwin: Mark mknod as unsupported
Date: Wed, 30 May 2018 14:20:26 +0200

On Sat, 26 May 2018 01:23:13 -0400
address@hidden wrote:

> From: Keno Fischer <address@hidden>
> 
> Signed-off-by: Keno Fischer <address@hidden>
> ---
>  hw/9pfs/9p-local.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
> index c55ea25..3e358b7 100644
> --- a/hw/9pfs/9p-local.c
> +++ b/hw/9pfs/9p-local.c
> @@ -669,6 +669,13 @@ static int local_mknod(FsContext *fs_ctx, V9fsPath 
> *dir_path,
>          return -1;
>      }
>  
> +#ifdef CONFIG_DARWIN
> +    /* Darwin doesn't have mknodat and it's unlikely to work anyway,

What's unlikely to work ?

> +       so let's just mark it as unsupported */
> +    err = -1;
> +    errno = EOPNOTSUPP;
> +    goto out;
> +#else

Please introduce qemu_mknodat() with distinct implementations for linux
and darwin.

>      if (fs_ctx->export_flags & V9FS_SM_MAPPED ||
>          fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {
>          err = mknodat(dirfd, name, fs_ctx->fmode | S_IFREG, 0);
> @@ -699,6 +706,8 @@ static int local_mknod(FsContext *fs_ctx, V9fsPath 
> *dir_path,
>  
>  err_end:
>      unlinkat_preserve_errno(dirfd, name, 0);
> +#endif
> +
>  out:
>      close_preserve_errno(dirfd);
>      return err;




reply via email to

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