emulator: clean-up some headers and sources 19/24219/1
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 9 Jul 2014 04:40:43 +0000 (13:40 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 9 Jul 2014 04:40:43 +0000 (13:40 +0900)
Rename "maru_common.h" to "emulator_common.h".
Remove unnecessary headers.
Remove "guest_debug.h".

Change-Id: I98b4fcf5c3205e4a537685a168f761a749dbd34b
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
26 files changed:
tizen/src/Makefile
tizen/src/display/maru_display.c
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/emulator.h
tizen/src/emulator_common.h [new file with mode: 0644]
tizen/src/emulator_legacy.c
tizen/src/emulator_options.c
tizen/src/emulator_options.h
tizen/src/guest_debug.h [deleted file]
tizen/src/hw/maru_board.c
tizen/src/maru_common.h [deleted file]
tizen/src/ns_event.m
tizen/src/scripts/sdbscript [new file with mode: 0755]
tizen/src/sdbscript [deleted file]
tizen/src/skin/maruskin_client.c
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_server.c
tizen/src/util/maru_device_hotplug.c
tizen/src/util/maru_err_table.c
tizen/src/util/osutil-linux.c
tizen/src/util/osutil.h
tizen/src/util/sdb.c
tizen/src/util/sdb.h
util/oslib-posix.c
vl.c

index ba88b34ac058f72041511939b6ab52962bfb1144..765019994e4c87b6728c8239f2e284f855f0ee10 100644 (file)
@@ -34,22 +34,22 @@ qemu_distclean:
 check_hax:
        @echo "build check hax"
 ifdef CONFIG_WIN32
-       $(CC) -o check-hax.exe util/check_hax.c
+       $(CC) -o util/check-hax.exe util/check_hax.c
 endif
 ifdef CONFIG_DARWIN
-       $(CC) -mmacosx-version-min=10.4 -o check-hax util/check_hax.c
+       $(CC) -mmacosx-version-min=10.4 -o util/check-hax util/check_hax.c
 endif
 
 check_cam:
        @echo "build check cam"
 ifdef CONFIG_LINUX
-       $(CC) -o check-cam util/check_cam.c -lv4l2 -lv4lconvert
+       $(CC) -o util/check-cam util/check_cam.c -lv4l2 -lv4lconvert
 endif
 ifdef CONFIG_WIN32
-       $(CC) -o check-cam.exe util/check_cam.c -I. -lole32 -loleaut32 -luuid -lstrmiids
+       $(CC) -o util/check-cam.exe util/check_cam.c -I. -lole32 -loleaut32 -luuid -lstrmiids
 endif
 ifdef CONFIG_DARWIN
-       $(CC) -o check-cam util/check_cam.c
+       $(CC) -o util/check-cam util/check_cam.c
 endif
 
 skin_client:
@@ -73,9 +73,9 @@ build_info:
 
 clean: qemu_clean
 ifndef CONFIG_LINUX
-       rm -f check-hax$(EXECUTABLE_EXTENSION) check-cam$(EXECUTABLE_EXTENSION)
+       rm -f util/check-hax$(EXECUTABLE_EXTENSION) util/check-cam$(EXECUTABLE_EXTENSION)
 else
-       rm -f check-cam
+       rm -f util/check-cam
 endif
 distclean: clean qemu_distclean
 
@@ -115,7 +115,7 @@ endif
 
 # check capabilities of OpenGL and Webcam
        cp -pP ../../i386-softmmu/check-gl$(EXECUTABLE_EXTENSION) $(EMUL_DIR)/bin
-       cp -pP check-cam$(EXECUTABLE_EXTENSION) $(EMUL_DIR)/bin
+       cp -pP util/check-cam$(EXECUTABLE_EXTENSION) $(EMUL_DIR)/bin
 
 # Enable HW Virtualization on Linux
 ifdef CONFIG_LINUX
@@ -125,12 +125,12 @@ endif
 
 # check HW Virtualization on Windows and MAC OS X.
 ifndef CONFIG_LINUX
-       cp -pP check-hax$(EXECUTABLE_EXTENSION) $(EMUL_DIR)/bin
+       cp -pP util/check-hax$(EXECUTABLE_EXTENSION) $(EMUL_DIR)/bin
 endif
 
 # give a title name for sdb terminal.
 ifdef CONFIG_DARWIN
-       cp -pP sdbscript $(EMUL_DIR)/bin
+       cp -pP scripts/sdbscript $(EMUL_DIR)/bin
 endif
 
 # use shared memory for display framebuffer
@@ -227,7 +227,7 @@ endif
 
 # check capabilities of OpenGL and Webcam
        cp -pP ../../i386-softmmu/check-gl$(EXECUTABLE_EXTENSION) $(DIBS_COMMON_DIR)/bin
-       cp -pP check-cam$(EXECUTABLE_EXTENSION) $(DIBS_COMMON_DIR)/bin
+       cp -pP util/check-cam$(EXECUTABLE_EXTENSION) $(DIBS_COMMON_DIR)/bin
 
 
 # Enable HW Virtualization on Linux
@@ -239,12 +239,12 @@ endif
 
 # check HW Virtualization on Windows and MAC OS X.
 ifndef CONFIG_LINUX
-       cp -pP check-hax$(EXECUTABLE_EXTENSION) $(DIBS_COMMON_DIR)/bin
+       cp -pP util/check-hax$(EXECUTABLE_EXTENSION) $(DIBS_COMMON_DIR)/bin
 endif
 
 # give a title name for sdb terminal.
 ifdef CONFIG_DARWIN
-       cp -pP sdbscript $(DIBS_COMMON_DIR)/bin
+       cp -pP scripts/sdbscript $(DIBS_COMMON_DIR)/bin
 endif
 
 # use shared memory for display framebuffer
index b00f144b1ca9cb295085d9a15b4ad907612dedb3..6276067d8e242f895b1e7d42dd4764a30a3ba412 100644 (file)
@@ -29,7 +29,7 @@
 
 
 #include "emulator.h"
-#include "maru_common.h"
+#include "emulator_common.h"
 #include "maru_display.h"
 #include "debug_ch.h"
 
index 7d45b99720472f4daaa2e9aa1733467ad32ecdbf..67286fbfc1e14084906fc5166d88500acb9cdc1c 100644 (file)
@@ -29,7 +29,6 @@
  *
  */
 
-#include "maru_common.h"
 #include "emul_state.h"
 #include "skin/maruskin_server.h"
 #include "debug_ch.h"
index 5dc74daf3cd2b2a137c96ad9889edfba1af5aaa3..f63fb8af2a715184c8bccde97c6b8b242462cefe 100644 (file)
@@ -34,7 +34,6 @@
 #define __EMUL_STATE_H__
 
 
-#include "maru_common.h"
 #include "display/maru_finger.h"
 
 enum {
index e9f9db0d389e0d83923c2d56449d829f17d35dff..0403a2257312b51227978df6d67ba6e4dafaa322 100644 (file)
@@ -37,7 +37,7 @@
 #ifndef __EMULATOR_H__
 #define __EMULATOR_H__
 
-#include "maru_common.h"
+#include "emulator_common.h"
 #include "qapi/qmp/qlist.h"
 #include "qemu/option.h"
 #include "sysemu/sysemu.h"
@@ -54,7 +54,6 @@ const gchar * prepare_maru(const gchar * const kernel_cmdline);
 void start_skin(void);
 
 const gchar * get_log_path(void);
-int maru_device_check(QemuOpts *opts);
 
 void emulator_add_exit_notifier(Notifier *notify);
 
diff --git a/tizen/src/emulator_common.h b/tizen/src/emulator_common.h
new file mode 100644 (file)
index 0000000..64d221b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Emulator
+ *
+ * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * MunKyu Im <munkyu.im@samsung.com>
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ * HyunJun Son
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+/**
+ * @file emulator_common.h
+ * @brief - header file that covers maru common features
+ */
+
+#ifndef __EMULATOR_COMMON_H__
+#define __EMULATOR_COMMON_H__
+
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <glib/gprintf.h>
+
+#include "config-host.h"
+
+#if !defined(PATH_MAX)
+#if defined(MAX_PATH)
+#define PATH_MAX    MAX_PATH
+#else
+#define PATH_MAX    256
+#endif
+#endif
+
+#define JAVA_MAX_COMMAND_LENGTH 1024
+
+#define JAR_SKINFILE "emulator-skin.jar"
+#define JAVA_LIBRARY_PATH "-Djava.library.path"
+
+#ifndef CONFIG_DARWIN
+#define JAVA_EXEOPTION "-jar"
+#else
+#define JAVA_EXEOPTION "-XstartOnFirstThread -jar" // Must start the Java window on the first thread on Mac
+#endif
+#define JAVA_SIMPLEMODE_OPTION "simple.msg"
+
+#ifdef CONFIG_WIN32
+#define MY_KEY_WOW64_64KEY 0x0100
+#else
+#define JAVA_EXEFILE_PATH "java"
+#endif
+
+#endif /* __EMULATOR_COMMON_H__ */
index 47b87de6b24479c33d38a842d8de1e53c95a1a24..3d75746b8926fad58b2ed59b56f4f57b970b2993 100644 (file)
@@ -38,7 +38,6 @@
 #include "build_info.h"
 #include "emulator.h"
 #include "emul_state.h"
-#include "guest_debug.h"
 #include "hw/virtio/maru_virtio_touchscreen.h"
 #include "util/check_gl.h"
 #include "util/maru_err_table.h"
index 2b393f92e9f6611561a71a1f0c7ba4063ff6cc71..a9d28cd5e26bcec310e35d25d40f7213bd4fa293 100644 (file)
@@ -29,7 +29,6 @@
 #include <string.h>
 #include "qemu/queue.h"
 
-#include "maru_common.h"
 #include "emulator_options.h"
 #include "emulator.h"
 
index 66022a057c2a04151882f64b180a51beb1fce28d..ee9a8989068d5b90807f0d173ed4c32797af2e5d 100644 (file)
@@ -29,6 +29,8 @@
 #ifndef __EMULATOR_OPTIONS_H__
 #define __EMULATOR_OPTIONS_H__
 
+#include "emulator_common.h"
+
 void set_variable(const char * const arg1, const char * const arg2, bool override);
 char *get_variable(const char * const name);
 void reset_variables(void);
diff --git a/tizen/src/guest_debug.h b/tizen/src/guest_debug.h
deleted file mode 100644 (file)
index c539d90..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Emulator
- *
- * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * SeokYeon Hwang <syeon.hwang@samsung.com>
- * MunKyu Im <munkyu.im@samsung.com>
- * GiWoong Kim <giwoong.kim@samsung.com>
- * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * HyunJun Son
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-/**
- * @file guest_debug.h
- * @brief - header of file these are config structures and defines in emulator
- */
-
-#ifndef __GUEST_DEBUG_H__
-#define __GUEST_DEBUG_H__
-
-#include "exec/memory.h"
-
-char *get_logpath(void);
-MemoryRegion *get_ram_memory(void);
-
-#endif /* __GUEST_DEBUG_H__ */
index ea61612524d3cbbf641c0aaa5535bc522a6d7179..e0feeb0855450e74fa3b3cf0c385461530883369 100644 (file)
  * add some TIZEN-speciaized device...
  */
 
-#include <glib.h>
-
-#include "hw/hw.h"
-#include "hw/i386/pc.h"
-#include "hw/i386/apic.h"
-#include "hw/pci/pci.h"
-#include "hw/pci/pci_ids.h"
-#include "hw/usb.h"
-#include "net/net.h"
 #include "hw/boards.h"
-#include "hw/ide.h"
-#include "sysemu/kvm.h"
-#include "hw/kvm/clock.h"
-#include "sysemu/sysemu.h"
-#include "hw/sysbus.h"
-#include "hw/cpu/icc_bus.h"
-#include "sysemu/arch_init.h"
-#include "sysemu/blockdev.h"
-#include "hw/i2c/smbus.h"
-#include "hw/xen/xen.h"
-#include "exec/memory.h"
-#include "exec/address-spaces.h"
-#include "hw/acpi/acpi.h"
-#include "cpu.h"
-#ifdef CONFIG_XEN
-#  include <xen/hvm/hvm_info_table.h>
-#endif
+#include "hw/i386/pc.h"
 
-#include "maru_common.h"
-#include "guest_debug.h"
+#include "emulator_common.h"
 #include "maru_pm.h"
 
 #define MAX_IDE_BUS 2
diff --git a/tizen/src/maru_common.h b/tizen/src/maru_common.h
deleted file mode 100644 (file)
index 2bfd57a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Emulator
- *
- * Copyright (C) 2011, 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * SeokYeon Hwang <syeon.hwang@samsung.com>
- * MunKyu Im <munkyu.im@samsung.com>
- * GiWoong Kim <giwoong.kim@samsung.com>
- * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
- * HyunJun Son
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-/**
- * @file maru_common.h
- * @brief - header file that covers maru common features
- */
-
-#ifndef __MARU_COMMON_H__
-#define __MARU_COMMON_H__
-
-#include <stddef.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <glib/gstdio.h>
-#include <glib/gprintf.h>
-
-#include "config-host.h"
-
-#if !defined(PATH_MAX)
-#if defined(MAX_PATH)
-#define PATH_MAX    MAX_PATH
-#else
-#define PATH_MAX    256
-#endif
-#endif
-
-#define JAVA_MAX_COMMAND_LENGTH 1024
-
-#define JAR_SKINFILE "emulator-skin.jar"
-#define JAVA_LIBRARY_PATH "-Djava.library.path"
-
-#ifndef CONFIG_DARWIN
-#define JAVA_EXEOPTION "-jar"
-#else
-#define JAVA_EXEOPTION "-XstartOnFirstThread -jar" // Must start the Java window on the first thread on Mac
-#endif
-#define JAVA_SIMPLEMODE_OPTION "simple.msg"
-
-#ifdef CONFIG_WIN32
-#define MY_KEY_WOW64_64KEY 0x0100
-#else
-#define JAVA_EXEFILE_PATH "java"
-#endif
-
-
-// W/A for preserve larger continuous heap for RAM.
-extern void *preallocated_ptr;
-
-#endif /* __MARU_COMMON_H__ */
index 9e71f074811244d606e2452758d46e81e2ae2492..69928df519485edeca3e5952ac9d4d71beb3ccdb 100644 (file)
@@ -1,15 +1,15 @@
-#import <Cocoa/Cocoa.h>                                         
+#import <Cocoa/Cocoa.h>
 #import "ns_event.h"
 
 // ns event loop for receive the events from cocoa framework
 void ns_event_loop(int* keepRunning)
 {
-    NSDate* distantFuture;    
+    NSDate* distantFuture;
 
     NSRunLoop* theRunLoop = [NSRunLoop currentRunLoop];
     do {
          distantFuture = [NSDate dateWithTimeIntervalSinceNow:0.5];
     }
-    while (*keepRunning && [theRunLoop runMode:NSDefaultRunLoopMode beforeDate:distantFuture]);    
+    while (*keepRunning && [theRunLoop runMode:NSDefaultRunLoopMode beforeDate:distantFuture]);
     // return [[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 1]];
 }
diff --git a/tizen/src/scripts/sdbscript b/tizen/src/scripts/sdbscript
new file mode 100755 (executable)
index 0000000..1f5b0b4
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+if [ "$1" == "" ];
+then
+        echo "There is no emulator name for an argument. \nusage: sdbscript emulator-261xx"
+        exit -1
+else
+    TITLE=$1
+    osascript > /dev/null << END
+    tell application "Terminal"
+        activate
+        do script "`pwd`/../../sdb -s $TITLE shell"
+        set custom title of first window to "$TITLE"
+    end tell
+END
+fi
diff --git a/tizen/src/sdbscript b/tizen/src/sdbscript
deleted file mode 100755 (executable)
index 1f5b0b4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-if [ "$1" == "" ];
-then
-        echo "There is no emulator name for an argument. \nusage: sdbscript emulator-261xx"
-        exit -1
-else
-    TITLE=$1
-    osascript > /dev/null << END
-    tell application "Terminal"
-        activate
-        do script "`pwd`/../../sdb -s $TITLE shell"
-        set custom title of first window to "$TITLE"
-    end tell
-END
-fi
index 0c6fc22b22347dbfdef326aacf3a02a2e3ce9b82..5a327f02a83c0e4686606f1425476c24c6ccc55d 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "qemu-common.h"
 
-#include "maru_common.h"
 #include "maruskin_client.h"
 #include "maruskin_server.h"
 #include "emulator.h"
index 7bad11b4cc13d751b9b8a8e12872188f570aa9ea..bca9fd08ca111c21187a7a45db7bf825d6c6c2a0 100644 (file)
@@ -35,7 +35,6 @@
 #include "sysemu/sysemu.h"
 #include "hw/sysbus.h"
 
-#include "maru_common.h"
 #include "maruskin_operation.h"
 #include "hw/pci/maru_brightness.h"
 #include "hw/virtio/maru_virtio_hwkey.h"
index 5c94ada3c813e103f4bf534a32566f8e9f2c1a2d..e8229ee1c77a703a240db335fbd185fab33e31ac 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <pthread.h>
 #include "emulator.h"
-#include "maru_common.h"
 #include "maruskin_server.h"
 #include "maruskin_operation.h"
 #include "display/maru_display.h"
index 578161b698d6af6ded6bc1c450aff4051546104f..70d74981b168dac508379d47eaee570c14334a25 100644 (file)
@@ -34,7 +34,6 @@
 #include "sysemu/blockdev.h"
 #include "qemu/event_notifier.h"
 
-#include "maru_common.h"
 #include "emulator.h"
 #include "maru_device_hotplug.h"
 
index 62c834de5fe276ea94ea412d481de5274d7471ab..b9d767f7258f0ee4c1825b4f531675e05f1c2b53 100644 (file)
@@ -29,7 +29,7 @@
  */
 
 #include "qemu-common.h"
-#include "maru_common.h"
+#include "emulator_common.h"
 #include "maru_err_table.h"
 #include "debug_ch.h"
 
index 8ebbb89c0303f609ebf998840e5713aca42f6653..d9b3032d6be165672ebbdb0ed7c2635897bae507 100644 (file)
@@ -35,9 +35,9 @@
  */
 
 #include <png.h>
-#include "maru_common.h"
 #include "osutil.h"
 #include "emulator.h"
+#include "emul_state.h"
 #include "debug_ch.h"
 #include "maru_err_table.h"
 #include "sdb.h"
index 338d1cb79b21f364618ff70b2128730cbd282d6d..ffa0596c5daeeff4afb230ef961db4fa32353adb 100644 (file)
@@ -33,8 +33,7 @@
 #define __OSUTIL_H__
 
 #include "qemu-common.h"
-#include "maru_common.h"
-#include "emul_state.h"
+#include "emulator_common.h"
 
 #define HTTP_PROTOCOL "http="
 #define HTTP_PREFIX "http://"
index fea3dda87d0e90dd04cbda0ed5c8f0f701f9396b..f2728d56272e77836d6904dc78963fcfebacf029 100644 (file)
@@ -35,6 +35,7 @@
 #include "block/nbd.h"
 
 #include "emulator.h"
+#include "emulator_common.h"
 #include "debug_ch.h"
 #include "emul_state.h"
 
index c1b66379934288c0e1906dcf178f88e203a09f71..98ec33d3b5a1597bbcfce8920bbdb5caebc71023 100644 (file)
@@ -31,8 +31,6 @@
 #ifndef SDB_SERVER_H_
 #define SDB_SERVER_H_
 
-#include "maru_common.h"
-
 #include <errno.h>
 
 #ifdef _WIN32
index c2bd47c2fbfa193ef6af4f12bb3e20dc9dc698b9..f7a8325459cca770750a0dbe41da01cff804bc7a 100644 (file)
@@ -68,7 +68,7 @@ extern int daemon(int, int);
 #endif
 
 #ifdef CONFIG_MARU
-#include "../../tizen/src/maru_common.h"
+#include "../../tizen/src/emulator_common.h"
 #endif
 
 int qemu_get_thread_id(void)
diff --git a/vl.c b/vl.c
index 3cf5854d2b5abafed41193b5f0e49a76795b07ac..5c83ae3c7e1a104a4e86ca81621851da7bfd2248 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -130,7 +130,6 @@ int qemu_main(int argc, char **argv, char **envp);
 #include "qom/object_interfaces.h"
 
 #ifdef CONFIG_MARU
-#include "tizen/src/maru_common.h"
 #include "tizen/src/emulator.h"
 #include "tizen/src/util/maru_err_table.h"
 #include "tizen/src/emul_state.h"