emul_state: provide RAM size using ram_size global variable
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 12 Aug 2015 05:33:14 +0000 (14:33 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 13 Aug 2015 07:31:43 +0000 (16:31 +0900)
Change-Id: I41b775176d1fc8d0f75d9490dc48c9ba23c7ecfc
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/ui/menu/detailedinfodialog.cpp
vl.c

index 310dea6061dc2cf21a370e15175ff01fe59cdbb0..d37cc05cec7a7cc62212b8252afbfae253b95c4d 100644 (file)
@@ -435,17 +435,6 @@ bool get_emul_cpu_accel(void)
     return false;
 }
 
-/* VM ram size */
-void set_emul_ram_size(const char *size)
-{
-    _emul_info.vm_ram_size = size;
-}
-
-const char* get_emul_ram_size(void)
-{
-    return _emul_info.vm_ram_size;
-}
-
 /* file sharing path */
 void set_emul_file_sharing_path(const char *path)
 {
@@ -615,6 +604,12 @@ bool is_gpu_accel_enabled(void)
     return gpu_accel_enabled;
 }
 
+// ram size
+uint64_t get_ram_size(void)
+{
+    return ram_size;
+}
+
 // vm_data_path
 static const char *vm_data_path = NULL;
 
index 266101894751409db7aaa640bc5fafba543b2ec0..265a7dc7e7018f0566bd30ca789726a8e994c884 100644 (file)
@@ -89,7 +89,6 @@ enum {
 };
 
 typedef  struct EmulatorConfigInfo {
-    bool skin_enable;
     int sdl_bpp;
     bool input_mouse_enable;
     bool input_touch_enable;
@@ -103,7 +102,6 @@ typedef  struct EmulatorConfigInfo {
     int spice_port;
     const char *skin_path;
     const char *file_sharing_path;
-    const char *vm_ram_size;
     int serial_port;
     /* add here */
 } EmulatorConfigInfo;
@@ -140,7 +138,6 @@ void set_emul_ecs_port(int port);
 void set_emul_guest_ip(char *ip);
 void set_emul_host_ip(char *ip);
 void set_emul_file_sharing_path(const char *path);
-void set_emul_ram_size(const char *size);
 
 void set_emulator_condition(int state);
 void set_emul_rotation(short rotation_type);
@@ -163,7 +160,6 @@ int get_emul_spice_port(void);
 const char* get_emul_skin_path(void);
 bool get_emul_cpu_accel(void);
 const char* get_emul_file_sharing_path(void);
-const char* get_emul_ram_size(void);
 
 int get_emulator_condition(void);
 short get_emul_rotation(void);
@@ -193,6 +189,7 @@ const char *get_vm_name(void);
 const char *get_profile_name(void);
 bool is_gpu_accel_enabled(void);
 const char *get_vm_data_path(void);
+uint64_t get_ram_size(void);
 void set_initial_display_resolution(int width, int height);
 int get_display_resolution_width(void);
 int get_display_resolution_height(void);
index 86b0161559546e0147593230a62fcc5d712810f4..4bd539c73bde95affa2bd170c09aaa44066aa1be 100644 (file)
@@ -98,8 +98,7 @@ DetailedInfoDialog::DetailedInfoDialog(QWidget *parent) :
     setDataTable(vmInfoTable, DETAILED_INFO_CPU, "x86", index++);
 
     setDataTable(vmInfoTable, DETAILED_INFO_RAM_SIZE,
-        QString(get_emul_ram_size()) + " MB", index++);
-
+        QString::number(get_ram_size() >> 20) + " MiB", index++);
     setDataTable(vmInfoTable, DETAILED_INFO_DPY_RESOLUTION,
         QString::number(win->uiInfo->resolution.width()) + "x" +
         QString::number(win->uiInfo->resolution.height()), index++);
diff --git a/vl.c b/vl.c
index a1d9dcdf1794c35ba66e53c99201bcd8be8aa28a..50726f9f7ef2f9a125d78bd107c3b14243b34c82 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3304,10 +3304,6 @@ int main(int argc, char **argv, char **envp)
                             "'%s' option", slots_str ? "maxmem" : "slots");
                     exit(EXIT_FAILURE);
                 }
-
-#ifdef CONFIG_MARU
-                set_emul_ram_size(optarg);
-#endif
                 break;
             }
 #ifdef CONFIG_TPM