提交 2507718b 编写于 作者: A Aneesh Kumar K.V 提交者: Anthony Liguori

9pfs: improve portability to older systems

I guess we can also make sure we don't  call local_ioc_getversion at
all.
Reported-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 51711aee
......@@ -717,10 +717,14 @@ static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
static int local_init(FsContext *ctx)
{
int err;
int err = 0;
struct statfs stbuf;
ctx->export_flags |= V9FS_PATHNAME_FSCONTEXT;
#ifdef FS_IOC_GETVERSION
/*
* use ioc_getversion only if the iocl is definied
*/
err = statfs(ctx->fs_root, &stbuf);
if (!err) {
switch (stbuf.f_type) {
......@@ -732,6 +736,7 @@ static int local_init(FsContext *ctx)
break;
}
}
#endif
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册