From adef62fe1baa719b75e65f6a8e38c74cbf85041b Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Thu, 6 Aug 2015 13:22:42 +0900 Subject: [PATCH] error_handler: removed deprecated functions Change-Id: I7c4889f6d81c944589fc34f29bed278501358bc2 Signed-off-by: SeokYeon Hwang --- tizen/src/util/error_handler.c | 88 +--------------------------------- tizen/src/util/error_handler.h | 20 -------- 2 files changed, 1 insertion(+), 107 deletions(-) diff --git a/tizen/src/util/error_handler.c b/tizen/src/util/error_handler.c index 87f36f7c2b..161da33b0e 100644 --- a/tizen/src/util/error_handler.c +++ b/tizen/src/util/error_handler.c @@ -45,27 +45,12 @@ #include "error_handler.h" #include "emulator_common.h" #include "emulator.h" +#include "skin/maruskin_client.h" #include "debug_ch.h" MULTI_DEBUG_CHANNEL(qemu, backtrace); -// deprecated -/* This table must match the enum definition */ -static char _maru_string_table[][JAVA_MAX_COMMAND_LENGTH] = { - /* 0 */ "", - /* 1 */ FAILED_TO_ALLOCATE_MEMORY, - /* 2 */ FAILED_TO_LOAD_KERNEL CHECK_FILE_VALID, - /* 3 */ FAILED_TO_LOAD_BIOS CHECK_FILE_VALID, - /* 4 */ FAILED_TO_INITIALIZE_SKIN, - /* 5 */ EMULATOR_HAS_STOPPED, - /* add here.. */ - "" -}; - -static int maru_exit_status = MARU_EXIT_NORMAL; -static char *maru_exit_msg; - #ifdef CONFIG_WIN32 static LPTOP_LEVEL_EXCEPTION_FILTER prevExceptionFilter; #endif @@ -75,70 +60,6 @@ static pthread_spinlock_t siglock; void maru_sighandler(int sig); #endif -// deprecated -char *get_canonical_path(char const *const path) -{ - if ((int)g_path_is_absolute(path)) { - return (char *)g_strdup(path); - } - - char *canonical_path; - -#ifndef _WIN32 - char *current_dir = g_get_current_dir(); - canonical_path = g_strdup_printf("%s/%s", current_dir, path); - g_free(current_dir); -#else - canonical_path = g_malloc(MAX_PATH); - GetFullPathName(path, MAX_PATH, canonical_path, NULL); -#endif - - return canonical_path; -} - -// deprecated -// Use error_report() instead -void register_exit_message(int status, char const *format, ...) -{ - va_list args; - - if (status >= MARU_EXIT_NORMAL) { - fprintf(stderr, "Invalid error message index = %d\n", - status); - return; - } - if (maru_exit_status != MARU_EXIT_NORMAL) { - fprintf(stderr, "The error message is already registered = %d\n", - maru_exit_status); - return; - } - - maru_exit_status = status; - - if (maru_exit_status == MARU_EXIT_HB_TIME_EXPIRED) { - fprintf(stderr, "Skin client could not connect to Skin server." - " The time of internal heartbeat has expired.\n"); - } - - if (!format) { - format = ""; - } - - va_start(args, format); - char *additional = g_strdup_vprintf(format, args); - va_end(args); - maru_exit_msg = g_strdup_printf("%s%s", _maru_string_table[maru_exit_status], - additional); - g_free(additional); - - if (strlen(maru_exit_msg) >= JAVA_MAX_COMMAND_LENGTH) { - maru_exit_msg[JAVA_MAX_COMMAND_LENGTH - 1] = '\0'; - } - - fprintf(stdout, "The error message is registered = %d : %s\n", - maru_exit_status, maru_exit_msg); -} - /* Print 'backtrace' */ #ifdef _WIN32 struct frame_layout { @@ -254,13 +175,6 @@ static void dump_backtrace(void *ptr, int depth) static void handle_error_at_exit(void) { - - // deprecated - if (maru_exit_status != MARU_EXIT_NORMAL || maru_exit_msg) { - start_simple_client(maru_exit_msg); - } - g_free(maru_exit_msg); - // dump backtrace log no matter what INFO("Stack backtrace for tracing...\n"); INFO("This is not an error.\n"); diff --git a/tizen/src/util/error_handler.h b/tizen/src/util/error_handler.h index 7081672d1a..f45b05f320 100644 --- a/tizen/src/util/error_handler.h +++ b/tizen/src/util/error_handler.h @@ -31,26 +31,6 @@ #ifndef __ERROR_HANDLER_H__ #define __ERROR_HANDLER_H__ -#include "tizen/src/skin/maruskin_client.h" - -// deprecated -/* TODO: define macro for fair of definition */ -/* This enum must match the table definition */ -enum { - /* 0 */ MARU_EXIT_UNKNOWN = 0, - /* 1 */ MARU_EXIT_MEMORY_EXCEPTION, - /* 2 */ MARU_EXIT_KERNEL_FILE_EXCEPTION, - /* 3 */ MARU_EXIT_BIOS_FILE_EXCEPTION, - /* 4 */ MARU_EXIT_SKIN_SERVER_FAILED, - /* 5 */ MARU_EXIT_HB_TIME_EXPIRED, - /* add here.. */ - MARU_EXIT_NORMAL -}; - void init_error_handler(void); -// deprecated -void register_exit_message(int status, char const *format, ...); -// deprecated -char *get_canonical_path(char const *const path); #endif /* __ERROR_HANDLER_H__ */ -- 2.34.1