g_free(ans.category);
}
-extern char tizen_target_img_path[];
void send_target_image_information(ECS_Client* ccli) {
ECS__Master master = ECS__MASTER__INIT;
ECS__DeviceAns ans = ECS__DEVICE_ANS__INIT;
- int length = strlen(tizen_target_img_path); // ??
+ const char *drive_image_file = get_drive_image_file();
+ int length = strlen(drive_image_file); // ??
ans.category = (char*) g_malloc(10 + 1);
strncpy(ans.category, "info", 10);
ans.data.data = g_malloc(length);
ans.data.len = length;
- memcpy(ans.data.data, tizen_target_img_path, length);
+ memcpy(ans.data.data, drive_image_file, length);
- LOG_TRACE("data = %s, length = %hu\n", tizen_target_img_path, length);
+ LOG_TRACE("data = %s, length = %hu\n", drive_image_file, length);
}
master.type = ECS__MASTER__TYPE__DEVICE_ANS;
msgproc_device_req_tgesture(ccli, msg);
} else if (!strcmp(cmd, "info")) {
// check to emulator target image path
- LOG_TRACE("receive info message %s\n", tizen_target_img_path);
send_target_image_information(ccli);
} else if (!strcmp(cmd, "hds")) {
msgproc_device_req_hds(ccli, msg, cmd);
char maru_kernel_cmdline[LEN_MARU_KERNEL_CMDLINE];
char tizen_target_path[PATH_MAX];
-char tizen_target_img_path[PATH_MAX];
#ifdef CONFIG_YAGL
extern bool yagl_enabled(void);
#include "build_info.h"
#include "emulator.h"
+#include "emulator_options.h"
#include "emul_state.h"
#include "hw/virtio/maru_virtio_touchscreen.h"
#include "util/check_gl.h"
extern gchar maru_kernel_cmdline[LEN_MARU_KERNEL_CMDLINE];
extern char tizen_target_path[PATH_MAX];
-extern char tizen_target_img_path[PATH_MAX];
extern int enable_yagl;
extern int enable_spice;
set_emul_vm_data_path(tizen_target_path);
set_emul_vm_name(g_path_get_basename(tizen_target_path));
- strcpy(tizen_target_img_path, path);
+ set_variable("drive_image_file", path, true);
free(path);
strcpy(log_path, tizen_target_path);
print_system_info();
INFO("Prepare running...\n");
- INFO("tizen_target_img_path: %s\n", tizen_target_img_path);
+ INFO("drive_image_flle: %s\n", get_drive_image_file());
int i;
fprintf(stdout, "qemu args: =========================================\n");
extern int _qemu_argc;
extern char **_qemu_argv;
-extern char tizen_target_img_path[]; //TODO: not legacy
-
DetailedInfoDialog::DetailedInfoDialog(QWidget *parent) :
QDialog(parent, Qt::Tool | Qt::WindowTitleHint |
Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint)
static int g_shmid;
-extern char tizen_target_img_path[];
-
void check_vm_lock_os(void)
{
/* TODO: */
perror("osutil-darwin: ");
return;
}
- g_sprintf(shared_memory, "%s", tizen_target_img_path);
+ g_sprintf(shared_memory, "%s", get_drive_image_file());
INFO("shared memory key: %d, value: %s\n", base_port, (char *)shared_memory);
if (shmdt(shared_memory) == -1) {
static int g_shmid;
static char *g_shared_memory;
-extern char tizen_target_img_path[];
-
void check_vm_lock_os(void)
{
int shm_id;
INFO("count of process that use shared memory : %d\n",
shm_info.shm_nattch);
if ((shm_info.shm_nattch > 0) &&
- g_strcmp0(tizen_target_img_path, (char *)shm_addr) == 0) {
+ g_strcmp0(get_drive_image_file(), (char *)shm_addr) == 0) {
if (check_port_bind_listen(port + 1) > 0) {
shmdt(shm_addr);
continue;
return;
}
- g_sprintf(g_shared_memory, "%s", tizen_target_img_path);
+ g_sprintf(g_shared_memory, "%s", get_drive_image_file());
INFO("shared memory key: %d value: %s\n",
base_port, (char *)g_shared_memory);
static HANDLE g_hMapFile;
static char *g_pBuf;
-extern char tizen_target_img_path[];
static char g_sdcard[256] = {0,};
static sdcard_info info;
CloseHandle(hMapFile);
}
- if (strcmp(pBuf, tizen_target_img_path) == 0) {
+ if (strcmp(pBuf, get_drive_image_file()) == 0) {
maru_register_exit_msg(MARU_EXIT_UNKNOWN,
"Can not execute this VM.\n"
"The same name is running now.");
check_vm_lock_os();
base_port = get_emul_vm_base_port();
- shared_memory = g_strdup_printf("%s", tizen_target_img_path);
+ shared_memory = g_strdup_printf("%s", get_drive_image_file());
port_in_use = g_strdup_printf("%d", base_port);
g_hMapFile = CreateFileMapping(
INVALID_HANDLE_VALUE, /* use paging file */