extern STARTUP_OPTION startup_option;
#endif
-static char logfile[512] = {0,};
+static char logpath[512] = {0,};
static char debugchfile[256] = {0, };
void set_log_path(char *path)
{
- strcpy(logfile, path);
+ strcpy(logpath, path);
}
static inline int interlocked_xchg_add( int *dest, int incr )
free(tmp);
}
-#if 0
- strcpy(logfile, get_virtual_target_abs_path(startup_option.vtm));
- strcat(logfile, "logs/emulator.log");
-#endif
-
- if(access(logfile, F_OK | R_OK) == 0)
- remove(logfile);
+ if(access(logpath, F_OK | R_OK) == 0)
+ remove(logpath);
}
/* allocate some tmp string space */
sprintf(txt, "%s", tmp);
// unlock
- if ((fp = fopen(logfile, "a+")) == NULL) {
+ if ((fp = fopen(logpath, "a+")) == NULL) {
fprintf(stdout, "Emulator can't open.\n"
"Please check if "
"this binary file is running on the right path.\n");
ret += vsnprintf(buf + ret, sizeof(buf) - ret, format, valist );
va_end(valist);
- if ((fp = fopen(logfile, "a+")) == NULL) {
+ if ((fp = fopen(logpath, "a+")) == NULL) {
fprintf(stdout, "Emulator can't open.\n"
"Please check if "
"this binary file is running on the right path.\n");
#include "process.h"
#include "option.h"
#include "emul_state.h"
+#include "qemu_socket.h"
#ifdef _WIN32
#include <winsock2.h>
int _emulator_condition = 0; //TODO:
static char tizen_target_path[MAXLEN] = {0, };
-static char logfile[MAXLEN] = { 0, };
+static char logpath[MAXLEN] = { 0, };
int get_emulator_condition(void)
{
else
strcpy(tizen_target_path, g_path_get_dirname(path));
- strcpy(logfile, tizen_target_path);
- strcat(logfile, LOGS_SUFFIX);
+ strcpy(logpath, tizen_target_path);
+ strcat(logpath, LOGS_SUFFIX);
#ifdef _WIN32
- if(access(g_win32_locale_filename_from_utf8(logfile), R_OK) != 0) {
- g_mkdir(g_win32_locale_filename_from_utf8(logfile), 0755);
+ if(access(g_win32_locale_filename_from_utf8(logpath), R_OK) != 0) {
+ g_mkdir(g_win32_locale_filename_from_utf8(logpath), 0755);
}
#else
- if(access(logfile, R_OK) != 0) {
- g_mkdir(logfile, 0755);
+ if(access(logpath, R_OK) != 0) {
+ g_mkdir(logpath, 0755);
}
#endif
- strcat(logfile, LOGFILE);
- set_log_path(logfile);
+ strcat(logpath, LOGFILE);
+ set_log_path(logpath);
}
void redir_output(void)
{
FILE *fp;
- fp = freopen(logfile, "a+", stdout);
+ fp = freopen(logpath, "a+", stdout);
if(fp ==NULL)
fprintf(stderr, "log file open error\n");
- fp = freopen(logfile, "a+", stderr);
+ fp = freopen(logpath, "a+", stderr);
if(fp ==NULL)
fprintf(stderr, "log file open error\n");
char** qemu_argv = NULL;
parse_options(argc, argv, &skin_argc, &skin_argv, &qemu_argc, &qemu_argv);
+ socket_init();
extract_info(qemu_argc, qemu_argv);
INFO("Emulator start !!!\n");