emulator: modified error popup message
authorGiWoong Kim <giwoong.kim@samsung.com>
Wed, 10 Jul 2013 04:14:12 +0000 (13:14 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 10 Jul 2013 04:50:13 +0000 (13:50 +0900)
modified error popup message when emulator failed to
load a bios file.

Change-Id: I6b9d1d8e824dca37b387d9afd36c534fff4fb3c9
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
hw/block/pc_sysfw.c
vl.c

index e3b4c02ce7c29bccee1422cf515b113955e0f2b4..5522d996919f9a99c9f21aef38f5f42c933ecf06 100644 (file)
@@ -143,10 +143,6 @@ static void pc_system_flash_init(MemoryRegion *rom_memory,
     pc_isa_bios_init(rom_memory, flash_mem, size);
 }
 
-#ifdef CONFIG_MARU
-extern char* qemu_get_data_dir(void);
-#endif
-
 static void old_pc_system_rom_init(MemoryRegion *rom_memory)
 {
     char *filename;
@@ -177,26 +173,7 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory)
     bios_error:
         fprintf(stderr, "qemu: could not load PC BIOS '%s'\n", bios_name);
 #ifdef CONFIG_MARU
-        char *error_msg = NULL;
-        const char *path = qemu_get_data_dir();
-        char *bios_path = NULL;
-        int bios_len = 0;
-
-        bios_len = strlen(path) + strlen("/") + strlen(bios_name) + 1;
-        bios_path = g_malloc(bios_len * sizeof(char));
-        if (!bios_path) {
-            fprintf(stderr, "qemu: failed to allocate memory\n");
-        }
-        snprintf(bios_path, bios_len, "%s/%s", path, bios_name);
-        error_msg = maru_convert_path(error_msg, bios_path);
-        maru_register_exit_msg(MARU_EXIT_BIOS_FILE_EXCEPTION, error_msg);
-
-        if (bios_path) {
-            g_free(bios_path);
-        }
-        if (error_msg) {
-            g_free(error_msg);
-        }
+        maru_register_exit_msg(MARU_EXIT_BIOS_FILE_EXCEPTION, bios_name);
 #endif
         exit(1);
     }
diff --git a/vl.c b/vl.c
index 98f808d9e6bd4e63c4fd7207b189245a858ba595..0adbdd1022b0e082a9e11e0dbe2312dc91c6f19a 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2365,15 +2365,6 @@ char *qemu_find_file(int type, const char *name)
     return NULL;
 }
 
-#ifdef CONFIG_MARU
-const char *qemu_get_data_dir(void);
-
-const char *qemu_get_data_dir(void)
-{
-    return data_dir;
-}
-#endif
-
 static int device_help_func(QemuOpts *opts, void *opaque)
 {
     return qdev_device_help(opts);