virtfs: remove redundant maru defines
authorSooyoung Ha <yoosah.ha@samsung.com>
Thu, 13 Aug 2015 07:57:15 +0000 (16:57 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Mon, 17 Aug 2015 07:45:12 +0000 (16:45 +0900)
The virtfs option doesn't be used anymore. So I remove the maru defines
in the virtfs-option case.
While modifying this, I modify the method about getting the default
file sharing path for detailed info and remove the setter function.

Change-Id: Icaafe4d38751305457f5683d91e8a7b39eac6643
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
tizen/src/ecs/ecs_msg_injector.c
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/ui/menu/detailedinfodialog.cpp
vl.c

index 6892443fd1e517dc0d46fb0ea4f11644431b1af8..587a3ed0e000a2f468126353350e2b73269ea23e 100644 (file)
@@ -329,7 +329,6 @@ static void* hds_mount_request_thread(void* args)
 }
 
 #define MSG_GROUP_HDS   100
-#define DEFAULT_STATIC_HDS_ID   "fsdef0"
 static void do_hds(char* cat, type_action action, const char* data)
 {
     FsDriverEntry *entry;
index 78db9d59acd52823b45e2345dc1327929ef42227..2408827d711b8c904d514a62ff7394c85ec4ecaf 100644 (file)
@@ -50,6 +50,7 @@ extern bool hax_allowed;
 #include "sysemu/block-backend.h"
 #include "net/net.h"
 #include "qmp-commands.h"
+#include "fsdev/qemu-fsdev.h"
 
 #include "emulator_options.h"
 #include "hw/virtio/maru_virtio_touchscreen.h"
@@ -436,14 +437,12 @@ bool get_emul_cpu_accel(void)
 }
 
 /* file sharing path */
-void set_emul_file_sharing_path(const char *path)
+const char* get_host_directory_sharing_path(void)
 {
-    _emul_info.file_sharing_path = path;
-}
+    FsDriverEntry *sharing_entry = get_fsdev_fsentry((char*)DEFAULT_STATIC_HDS_ID);
+    const char *sharing_path = (sharing_entry != NULL ? sharing_entry->path : NULL);
 
-const char* get_emul_file_sharing_path(void)
-{
-    return _emul_info.file_sharing_path;
+    return sharing_path;
 }
 
 //
index 265a7dc7e7018f0566bd30ca789726a8e994c884..70d85fc080d6c37d928e6db238cd4f8f0143e5d9 100644 (file)
@@ -43,6 +43,8 @@
 #define MAX_HDS_PATH    256
 #define MAX_PROFILE     256
 
+#define DEFAULT_STATIC_HDS_ID   "fsdef0"
+
 enum {
     RESET = 0,
     BOOT_COMPLETED = 1,
@@ -137,7 +139,6 @@ void set_emul_vm_base_port(int port);
 void set_emul_ecs_port(int port);
 void set_emul_guest_ip(char *ip);
 void set_emul_host_ip(char *ip);
-void set_emul_file_sharing_path(const char *path);
 
 void set_emulator_condition(int state);
 void set_emul_rotation(short rotation_type);
@@ -159,7 +160,6 @@ int get_emul_serial_port(void);
 int get_emul_spice_port(void);
 const char* get_emul_skin_path(void);
 bool get_emul_cpu_accel(void);
-const char* get_emul_file_sharing_path(void);
 
 int get_emulator_condition(void);
 short get_emul_rotation(void);
@@ -188,6 +188,7 @@ const char *get_http_proxy_addr(void);
 const char *get_vm_name(void);
 const char *get_profile_name(void);
 bool is_gpu_accel_enabled(void);
+const char* get_host_directory_sharing_path(void);
 const char *get_vm_data_path(void);
 uint64_t get_ram_size(void);
 void set_initial_display_resolution(int width, int height);
index bf3266f25c68a20af801166e1b63af69c7038126..079e4c9935834fe42410a829bad70f6022d7f397 100644 (file)
@@ -130,7 +130,7 @@ QTableWidget *DetailedInfoDialog::createVmInfoTable()
     insertTableRow(vmInfoTable, DETAILED_INFO_DPY_DENSITY,
         QString::number(get_display_pixel_density()), index++);
 
-    QString sharingPath(get_emul_file_sharing_path());
+    QString sharingPath(get_host_directory_sharing_path());
     insertTableRow(vmInfoTable, DETAILED_INFO_HDS_PATH,
         (sharingPath.isEmpty()) ? GENERIC_TEXT_NONE : sharingPath, index++);
 
diff --git a/vl.c b/vl.c
index 762feb825449d95a50f80cbe407f8c044ed7fdaa..1fb6182e81a085d702c6d6c04aa857c21ce47d53 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3486,22 +3486,13 @@ int main(int argc, char **argv, char **envp)
 
                 qemu_opt_set_bool(fsdev, "readonly",
                                 qemu_opt_get_bool(opts, "readonly", 0));
-#ifdef CONFIG_MARU
-                device = qemu_opts_create(qemu_find_opts("device"), "fileshare", 0,
-                                          &error_abort);
-#else
                 device = qemu_opts_create(qemu_find_opts("device"), NULL, 0,
                                           &error_abort);
-#endif
                 qemu_opt_set(device, "driver", "virtio-9p-pci");
                 qemu_opt_set(device, "fsdev",
                              qemu_opt_get(opts, "mount_tag"));
                 qemu_opt_set(device, "mount_tag",
                              qemu_opt_get(opts, "mount_tag"));
-
-#ifdef CONFIG_MARU
-                set_emul_file_sharing_path(qemu_opt_get(opts, "path"));
-#endif
                 break;
             }
             case QEMU_OPTION_virtfs_synth: {