[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/18] Stub 9pfs xattr functions for Windows.
From: |
Michael Fritscher |
Subject: |
[Qemu-devel] [PATCH 08/18] Stub 9pfs xattr functions for Windows. |
Date: |
Fri, 29 Sep 2017 13:13:13 +0200 |
Signed-off-by: Michael Fritscher <address@hidden>
---
hw/9pfs/9p-local.c | 4 +++-
hw/9pfs/9p-xattr.h | 30 ++++++++++++++++++++++++++++++
hw/9pfs/9p.c | 4 +++-
3 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 4c8e0f3296..c4feca27bd 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -22,7 +22,9 @@
#include <grp.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include "qemu/xattr.h"
+#ifndef _WIN32
+# include "qemu/xattr.h"
+#endif
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include <libgen.h>
diff --git a/hw/9pfs/9p-xattr.h b/hw/9pfs/9p-xattr.h
index 0d83996575..1c42c8dba0 100644
--- a/hw/9pfs/9p-xattr.h
+++ b/hw/9pfs/9p-xattr.h
@@ -14,7 +14,9 @@
#ifndef QEMU_9P_XATTR_H
#define QEMU_9P_XATTR_H
+#ifndef _WIN32
#include "qemu/xattr.h"
+#endif
typedef struct xattr_operations
{
@@ -49,6 +51,33 @@ extern XattrOperations *mapped_xattr_ops[];
extern XattrOperations *passthrough_xattr_ops[];
extern XattrOperations *none_xattr_ops[];
+#ifdef _WIN32
+static inline ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
+ const char *name, void *value, size_t
size)
+{
+ return 0;
+}
+
+static inline ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
+ void *value, size_t vsize)
+{
+ return 0;
+}
+
+static inline int v9fs_set_xattr(FsContext *ctx, const char *path,
+ const char *name, void *value, size_t size,
+ int flags)
+{
+ return 0;
+}
+
+static inline int v9fs_remove_xattr(FsContext *ctx, const char *path,
+ const char *name)
+{
+ return 0;
+}
+
+#else
ssize_t v9fs_get_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size);
ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value,
@@ -56,6 +85,7 @@ ssize_t v9fs_list_xattr(FsContext *ctx, const char *path,
void *value,
int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
void *value, size_t size, int flags);
int v9fs_remove_xattr(FsContext *ctx, const char *path, const char *name);
+#endif
ssize_t pt_listxattr(FsContext *ctx, const char *path, char *name, void *value,
size_t size);
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 23ac7bb532..53f812ec06 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -20,7 +20,9 @@
#include "qemu/sockets.h"
#include "virtio-9p.h"
#include "fsdev/qemu-fsdev.h"
-#include "9p-xattr.h"
+#ifndef _WIN32
+# include "9p-xattr.h"
+#endif
#include "coth.h"
#include "trace.h"
#include "migration/blocker.h"
--
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 <=
- [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, 2017/09/29
- [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