emulator: used "profile" variable instead of EVDI attribute
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 30 Jul 2015 12:53:07 +0000 (21:53 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Thu, 30 Jul 2015 12:53:07 +0000 (21:53 +0900)
Used "profile" variable instead of EVDI attribute for specifying
profile name.

Change-Id: I85aa0c043930eda725dd63c14240751192b6c1c8
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
tizen/src/emul_state.c
tizen/src/hw/virtio/maru_virtio_evdi.c
tizen/src/hw/virtio/maru_virtio_evdi.h
tizen/src/hw/virtio/maru_virtio_pci.c
tizen/src/util/extra_pkgs_install.c

index abb4bbd457a0f3557aeb627c112171061479372a..703576a430b3a7237f39c04750abb22372c1c7f7 100644 (file)
@@ -588,7 +588,7 @@ const char *get_vm_name(void)
 
 const char *get_profile_name(void)
 {
-    return vio_evdi->profile;
+    return get_variable("profile");
 }
 
 /* GPU virtualization */
index c87bc94a7cf88ac1df7070d76ecbc852b2d3e134..0f7b43a7ce8439f1e692ee90b248ffc1b27c9b4a 100644 (file)
@@ -241,9 +241,7 @@ static void virtio_evdi_realize(DeviceState *dev, Error **errp)
 
     vio_evdi->bh = qemu_bh_new(maru_evdi_bh, vio_evdi);
 
-    if (vio_evdi->profile) {
-        epi_init();
-    }
+    epi_init();
 }
 
 static void virtio_evdi_unrealize(DeviceState *dev, Error **errp)
@@ -265,7 +263,6 @@ static void virtio_evdi_reset(VirtIODevice *vdev)
 }
 
 static Property virtio_evdi_properties[] = {
-    DEFINE_PROP_STRING(ATTRIBUTE_NAME_EVDI, VirtIOEVDI, profile),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 37e75b097bc2167f0112bb878a9e23349d5d1a07..cf65021104e0fe6a8e7c29fbab16e8b42e1b91c1 100644 (file)
@@ -18,8 +18,6 @@ extern "C" {
 
 #define __MAX_BUF_SIZE  1024
 
-#define ATTRIBUTE_NAME_EVDI "profile"
-
 enum
 {
     route_qemu = 0,
@@ -50,8 +48,6 @@ typedef struct VirtIOEVDI{
     DeviceState     *qdev;
 
     QEMUBH *bh;
-
-    char            *profile;
 } VirtIOEVDI;
 
 extern VirtIOEVDI *vio_evdi;
index 61cfc219ddc7d047c2ab06c5570b97ea406a2f6b..9d425f48c703f324b8cc6edd36bb16634791fb3a 100644 (file)
@@ -415,7 +415,6 @@ static TypeInfo virtio_tablet_pci_info = {
 /* virtio-evdi-pci */
 
 static Property virtio_evdi_pci_properties[] = {
-    DEFINE_PROP_STRING(ATTRIBUTE_NAME_EVDI, VirtIOEVDIPCI, vdev.profile),
     DEFINE_PROP_END_OF_LIST(),
 };
 
index 49af34d72006b4ea9268dc164e82c7c2733fa68c..c15e6bbb0e3f5aaff94168c1099dca8c59d71f88 100644 (file)
@@ -55,14 +55,20 @@ static char* get_addon_path(void)
 #endif
 
     int ret = 0;
-    char* extra_path = (char*)malloc(MAX_PKG_LIST);
+
+    const char *profile_name = get_profile_name();
+    if (!profile_name) {
+        return NULL;
+    }
+
+    char *extra_path = (char*)malloc(MAX_PKG_LIST);
     if (!extra_path) {
         LOG_SEVERE("cannot alloc extra_path.\n");
         return NULL;
     }
 
     ret = sprintf(extra_path, "%s%s%s%s%s%s%s",
-            get_bin_path(), parent, get_profile_name(), separator,
+            get_bin_path(), parent, profile_name, separator,
             IMAGE_DIRECTORY, separator, ADDON_DIRECTORY);
     if (ret < 0) {
         LOG_SEVERE("ADDON PATH composition is failed.\n");