On Sat, 26 May 2018 01:23:13 -0400
keno@juliacomputing.com wrote:
> From: Keno Fischer <keno@alumni.harvard.edu>
>
> Signed-off-by: Keno Fischer <keno@juliacomputing.com>
> ---
> 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;