Merge branch 'tizen_qemu_2.0' into tizen
[sdk/emulator/qemu.git] / hw / 9pfs / virtio-9p.h
index 2c3603a..42b8d21 100644 (file)
@@ -5,7 +5,13 @@
 #include <dirent.h>
 #include <sys/time.h>
 #include <utime.h>
+#ifdef CONFIG_MARU
+#ifndef CONFIG_WIN32
 #include <sys/resource.h>
+#endif
+#else
+#include <sys/resource.h>
+#endif
 #include <glib.h>
 #include "hw/virtio/virtio.h"
 #include "fsdev/file-op-9p.h"
@@ -115,7 +121,21 @@ enum p9_proto_version {
 #define FID_NON_RECLAIMABLE     0x2
 static inline char *rpath(FsContext *ctx, const char *path)
 {
+#ifndef CONFIG_MARU
+    return g_strdup_printf("%s/%s", ctx->fs_root, path);
+#else
+#ifndef CONFIG_WIN32
     return g_strdup_printf("%s/%s", ctx->fs_root, path);
+#else
+    char *buffer;
+
+    buffer =  g_strdup_printf("%s\\%s", ctx->fs_root, path);
+    while(buffer[strlen(buffer)-1] == '\\'){
+        buffer[strlen(buffer)-1] = '\0';
+    }
+    return buffer;
+#endif
+#endif
 }
 
 /*