[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/18] Fix unused variable error and unsuded functio
From: |
Michael Fritscher |
Subject: |
[Qemu-devel] [PATCH 07/18] Fix unused variable error and unsuded function if FS_IOC_GETVERSION is not defined. |
Date: |
Fri, 29 Sep 2017 13:13:12 +0200 |
Signed-off-by: Michael Fritscher <address@hidden>
---
hw/9pfs/9p-local.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index e51af87309..4c8e0f3296 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -1372,10 +1372,10 @@ static int local_unlinkat(FsContext *ctx, V9fsPath *dir,
return ret;
}
+#ifdef FS_IOC_GETVERSION
static int local_ioc_getversion(FsContext *ctx, V9fsPath *path,
mode_t st_mode, uint64_t *st_gen)
{
-#ifdef FS_IOC_GETVERSION
int err;
V9fsFidOpenState fid_open;
@@ -1394,15 +1394,14 @@ 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
- errno = ENOTTY;
- return -1;
-#endif
}
+#endif
static int local_init(FsContext *ctx)
{
+#ifdef FS_IOC_GETVERSION
struct statfs stbuf;
+#endif
LocalData *data = g_malloc(sizeof(*data));
data->mountfd = open(ctx->fs_root, O_DIRECTORY | O_RDONLY);
--
2.13.2.windows.1
- [Qemu-devel] Make 9pfs buildable for Windows, Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 03/18] Disable the proxy fsdev under Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 01/18] Add definitions needed by file-op-9p.h for Windows, Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 04/18] Don't include sys/resource.h on Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 08/18] Stub 9pfs xattr functions for Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 05/18] Add definitions for 9p.c., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 06/18] Stub out functions for 9pfs., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 14/18] Disable rlimit under Windows, Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 15/18] Fix unavailable fields in stbuf under Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 16/18] Workaround for missing dent->d_type/d_off under Windows, Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 07/18] Fix unused variable error and unsuded function if FS_IOC_GETVERSION is not defined.,
Michael Fritscher <=
- [Qemu-devel] [PATCH 02/18] #include <sys/vfs.h> is not available under Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 17/18] Compile fixes for Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 12/18] Buildfix in 9p-util.c., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 18/18] Enable 9pfs for Windows in configure / makefiles, Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 11/18] Sete ctx->xops to null on Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 10/18] dirent has no d_off on Windows., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 13/18] fsetxattrat_nofollow doesn't seem to be defined on Windows - disable it., Michael Fritscher, 2017/09/29
- [Qemu-devel] [PATCH 09/18] Dont initialize fields which aren't available on Windows., Michael Fritscher, 2017/09/29
- Re: [Qemu-devel] Make 9pfs buildable for Windows, Paolo Bonzini, 2017/09/29