From: munkyu.im Date: Wed, 14 Mar 2012 06:50:31 +0000 (+0900) Subject: [Title]set target vms path X-Git-Tag: TizenStudio_2.0_p2.3~1745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=56e94b1f1276b9940e6f5817a497ec35233b0910;p=sdk%2Femulator%2Fqemu.git [Title]set target vms path [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- diff --git a/tizen/src/emulator.c b/tizen/src/emulator.c index f6a9b94..51f34ef 100644 --- a/tizen/src/emulator.c +++ b/tizen/src/emulator.c @@ -51,6 +51,7 @@ MULTI_DEBUG_CHANNEL(qemu, main); int tizen_base_port = 0; int _emulator_condition = 0; //TODO: +extern char tizen_vms_path[256]; int get_emulator_condition(void) { @@ -164,8 +165,9 @@ int main(int argc, char* argv[]) for(i = 0; i < qemu_argc; ++i) { INFO("%s ", qemu_argv[i]); - if(strstr(qemu_argv[i], IMAGE_PATH_PREFIX) != NULL) + if(strstr(qemu_argv[i], IMAGE_PATH_PREFIX) != NULL) { get_image_path(qemu_argc, qemu_argv[i]); + } } INFO("\n"); INFO("======================================================\n"); diff --git a/tizen/src/process.c b/tizen/src/process.c index eb993b4..8445185 100644 --- a/tizen/src/process.c +++ b/tizen/src/process.c @@ -42,7 +42,8 @@ //DEFAULT_DEBUG_CHANNEL(tizen); MULTI_DEBUG_CHANNEL(tizen, process); -static char pidfname[256] = { 0, }; +static char pidfname[512] = { 0, }; +static char tizen_vms_path[512] = {0, }; #ifdef _WIN32 static char *mbstok_r (char *string, const char *delim, char **save_ptr) @@ -147,16 +148,15 @@ int write_pidfile(char *path) { int fd = -1; char buf[128] = ""; - char *pid_dir; if(!g_path_is_absolute(path)) - pid_dir = g_get_current_dir(); + strcpy(tizen_vms_path, g_get_current_dir()); else - pid_dir = g_path_get_dirname(path); + strcpy(tizen_vms_path, g_path_get_dirname(path)); - sprintf(pidfname, "%s/.pid", pid_dir); + sprintf(pidfname, "%s/.pid", tizen_vms_path); - if (access(pid_dir, R_OK) != 0) { + if (access(tizen_vms_path, R_OK) != 0) { make_pid_path(pidfname); } #ifdef _WIN32