From: Sooyoung Ha Date: Thu, 13 Aug 2015 07:57:15 +0000 (+0900) Subject: virtfs: remove redundant maru defines X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60cfd56ee27edbf598b4c9464005d2aff9a381d3;p=sdk%2Femulator%2Fqemu.git virtfs: remove redundant maru defines 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 Signed-off-by: SeokYeon Hwang --- diff --git a/tizen/src/ecs/ecs_msg_injector.c b/tizen/src/ecs/ecs_msg_injector.c index 6892443fd1..587a3ed0e0 100644 --- a/tizen/src/ecs/ecs_msg_injector.c +++ b/tizen/src/ecs/ecs_msg_injector.c @@ -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; diff --git a/tizen/src/emul_state.c b/tizen/src/emul_state.c index 78db9d59ac..2408827d71 100644 --- a/tizen/src/emul_state.c +++ b/tizen/src/emul_state.c @@ -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; } // diff --git a/tizen/src/emul_state.h b/tizen/src/emul_state.h index 265a7dc7e7..70d85fc080 100644 --- a/tizen/src/emul_state.h +++ b/tizen/src/emul_state.h @@ -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); diff --git a/tizen/src/ui/menu/detailedinfodialog.cpp b/tizen/src/ui/menu/detailedinfodialog.cpp index bf3266f25c..079e4c9935 100644 --- a/tizen/src/ui/menu/detailedinfodialog.cpp +++ b/tizen/src/ui/menu/detailedinfodialog.cpp @@ -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 762feb8254..1fb6182e81 100644 --- 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: {