I guess we can also make sure we don't call local_ioc_getversion at
all.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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) {
break;
}
}
+#endif
return err;
}