提交 0e5fc994 编写于 作者: K Kirill A. Shutemov 提交者: Aneesh Kumar K.V

hw/9pfs: fix error handing in local_ioc_getversion()

v9fs_co_st_gen() expects to see error code in errno, not in return code.

Let's fix this.
Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
上级 2f61120c
......@@ -1068,8 +1068,8 @@ err_out:
static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
int err;
#ifdef FS_IOC_GETVERSION
int err;
V9fsFidOpenState fid_open;
/*
......@@ -1085,10 +1085,11 @@ static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
}
err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
local_close(ctx, &fid_open);
return err;
#else
err = -ENOTTY;
errno = ENOTTY;
return -1;
#endif
return err;
}
static int local_init(FsContext *ctx)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册