MULTI_DEBUG_CHANNEL(qemu, ecs);
-static void msgproc_device_ans(ECS_Client* ccli, const char* category, bool succeed, char* data)
+static void msgproc_device_ans(ECS_Client* ccli, const char* category, bool succeed, const char* data)
{
if (ccli == NULL) {
return;
} else if (!strcmp(cmd, "input")) {
msgproc_device_req_input(ccli, msg, cmd);
} else if (!strcmp(cmd, "vmname")) {
- char* vmname = get_emul_vm_name();
+ const char* vmname = get_emul_vm_name();
msgproc_device_ans(ccli, cmd, true, vmname);
} else if (!strcmp(cmd, "nfc")) {
msgproc_device_req_nfc(ccli, msg);
}
/* vm name */
-void set_emul_vm_name(char *vm_name)
+const char* get_emul_vm_name(void)
{
- _emul_info.vm_name = vm_name;
-}
+ if (!_emul_info.vm_name) {
+ _emul_info.vm_name = get_variable("vm_name");
+ }
-char* get_emul_vm_name(void)
-{
return _emul_info.vm_name;
}
char http_proxy_port[MAX_PORT_LEN];
int spice_port;
int websocket_port;
- char *vm_name;
+ const char *vm_name;
/* add here */
int serial_port;
} EmulatorConfigInfo;
void set_emul_rotation(short rotation_type);
void set_emul_caps_lock_state(int state);
void set_emul_num_lock_state(int state);
-void set_emul_vm_name(char *vm_name);
void set_emul_http_proxy_addr(char *addr);
void set_emul_http_proxy_port(char *port);
void set_emul_hds_attached(bool attached);
int get_host_lock_key_state_darwin(int key);
int get_emul_caps_lock_state(void);
int get_emul_num_lock_state(void);
-char* get_emul_vm_name(void);
+const char* get_emul_vm_name(void);
char* get_emul_http_proxy_addr(void);
char* get_emul_http_proxy_port(void);
bool get_emul_hds_attached(void);
strcpy(tizen_target_path, g_path_get_dirname(path));
}
- set_emul_vm_name(g_path_get_basename(tizen_target_path));
+ set_variable("vm_name", g_path_get_basename(tizen_target_path), true);
set_variable("drive_image_file", path, true);
free(path);