// unlock
if ((fp = fopen(logfile, "a+")) == NULL) {
- fprintf(stdout, "log file can't open.(%s)\n", logfile);
+ fprintf(stdout, "Emulator can't open (%s).\n"
+ "Please check whether or not "
+ "this emulator is running on the installation path.\n", logfile);
+ exit(1);
}
fputs(txt, fp);
if(!arch) /* for stand alone */
{
char *binary = g_path_get_basename(vtm_path);
- if(strcmp(binary, "emulator-x86") == 0)
+ if(strstr(binary, "emulator-x86"))
arch = g_strdup_printf("x86");
- else if(strcmp(binary, "emulator-arm") == 0)
+ else if(strstr(binary, "emulator-arm"))
arch = g_strdup_printf("arm");
else
{
if(!arch) /* for stand alone */
{
char *binary = g_path_get_basename(vtm_path);
- if(strcmp(binary, "emulator-x86") == 0)
+ if(strstr(binary, "emulator-x86"))
arch = g_strdup_printf("x86");
- else if(strcmp(binary, "emulator-arm") == 0)
+ else if(strstr(binary, "emulator-arm"))
arch = g_strdup_printf("arm");
else
{
}
if ((fd = open(pidfname, O_RDWR | O_CREAT, 0666)) < 0) {
- ERR( "%s at %s(%d)\n", strerror(errno), __FILE__, __LINE__);
- return -1;
+ ERR("Failed to create emulator.pid file\n");
+ ERR("%s at %s(%d)\n", strerror(errno), __FILE__, __LINE__);
+ exit(1);
}
-
- /* ±âÁ¸ ³»¿ë »èÁ¦ */
ftruncate(fd, 0);
memset(buf, 0, sizeof(buf));