summaryrefslogtreecommitdiff
path: root/fsdev
diff options
context:
space:
mode:
authorSooyoung Ha <yoosah.ha@samsung.com>2014-05-09 14:56:15 +0900
committerSooyoung Ha <yoosah.ha@samsung.com>2014-05-12 11:29:30 +0900
commitbe3d560ae8f1e58ec45fd20caf4ddcae998dacb4 (patch)
tree2662edf15a79e7bca513cc655051b05099b10d1a /fsdev
parent0117d6f3d24305b2678534a5515b0b38a90e3bb9 (diff)
downloadqemu-be3d560ae8f1e58ec45fd20caf4ddcae998dacb4.tar.gz
qemu-be3d560ae8f1e58ec45fd20caf4ddcae998dacb4.tar.bz2
qemu-be3d560ae8f1e58ec45fd20caf4ddcae998dacb4.zip
virtio-9p: enable the virtfs on Windows.
support the virtio-9p local operations on Windows to provide host directory sharing. Change-Id: Ib8869cba7bd1cb248d23feb19c73235b19192d86 Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Diffstat (limited to 'fsdev')
-rw-r--r--fsdev/file-op-9p.h17
-rw-r--r--fsdev/virtio-9p-marshal.c23
-rw-r--r--fsdev/virtio-9p-marshal.h6
3 files changed, 45 insertions, 1 deletions
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 339113066d..45e6a4a620 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -12,12 +12,16 @@
*/
#ifndef _FILEOP_H
#define _FILEOP_H
+#ifdef CONFIG_MARU
+
#include <sys/types.h>
#include <dirent.h>
#include <sys/time.h>
#include <utime.h>
#include <sys/stat.h>
+#ifndef CONFIG_WIN32
#include <sys/uio.h>
+#endif
#ifdef CONFIG_LINUX
#include <sys/vfs.h>
#endif
@@ -25,7 +29,20 @@
#include <sys/param.h>
#include <sys/mount.h>
#endif
+#ifdef CONFIG_WIN32
+#include "tizen/src/resources_win32.h"
+#endif
+struct iovec;
+#else /* ifndef CONFIG_MARU */
+#include <sys/types.h>
+#include <dirent.h>
+#include <sys/time.h>
+#include <utime.h>
+#include <sys/stat.h>
+#include <sys/uio.h>
+#include <sys/vfs.h>
+#endif
#define SM_LOCAL_MODE_BITS 0600
#define SM_LOCAL_DIR_MODE_BITS 0700
diff --git a/fsdev/virtio-9p-marshal.c b/fsdev/virtio-9p-marshal.c
index 20f308b760..53626a46ea 100644
--- a/fsdev/virtio-9p-marshal.c
+++ b/fsdev/virtio-9p-marshal.c
@@ -10,7 +10,8 @@
* the COPYING file in the top-level directory.
*
*/
-
+#include "qemu-common.h"
+#ifndef CONFIG_MARU
#include <glib.h>
#include <glib/gprintf.h>
#include <sys/types.h>
@@ -26,6 +27,26 @@
#include "virtio-9p-marshal.h"
#include "qemu/bswap.h"
+#else /* CONFIG_MARU */
+#include <glib.h>
+#include <glib/gprintf.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <sys/time.h>
+#include <utime.h>
+#include <string.h>
+#include <stdint.h>
+#include <errno.h>
+
+#include "qemu/compiler.h"
+#include "qemu/bswap.h"
+#include "virtio-9p-marshal.h"
+
+#ifndef CONFIG_WIN32
+#include <sys/uio.h>
+#endif
+#endif
+
void v9fs_string_free(V9fsString *str)
{
g_free(str->data);
diff --git a/fsdev/virtio-9p-marshal.h b/fsdev/virtio-9p-marshal.h
index 5df65a8357..431073cb5b 100644
--- a/fsdev/virtio-9p-marshal.h
+++ b/fsdev/virtio-9p-marshal.h
@@ -1,6 +1,12 @@
#ifndef _QEMU_VIRTIO_9P_MARSHAL_H
#define _QEMU_VIRTIO_9P_MARSHAL_H
+#ifdef CONFIG_MARU
+#ifdef CONFIG_WIN32
+#include "tizen/src/resources_win32.h"
+#endif
+#endif
+
typedef struct V9fsString
{
uint16_t size;