osutil: move making/checking vm lock position
authorMunkyu Im <munkyu.im@samsung.com>
Tue, 8 Sep 2015 06:53:23 +0000 (15:53 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 9 Sep 2015 02:09:26 +0000 (11:09 +0900)
move it after initializing device.
otherwise cannot get drive image path.

Change-Id: I22c730a6410cd7cb36ee3c4830370b5616dbfdd7
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
tizen/src/emulator.c

index ccb0c51..6f18a1d 100644 (file)
@@ -253,8 +253,6 @@ const char *prepare_maru(const char * const kernel_cmdline)
     // It is safe to call socket_init() multiple times.
     socket_init();
     init_vm_base_port();
-    // try to lock ASAP
-    make_vm_lock_os();
 
     // Assemble new kernel cmdline
     maru_kernel_cmdline = g_strdup_printf("%s sdb_port=%d, "
@@ -268,6 +266,7 @@ const char *prepare_maru(const char * const kernel_cmdline)
 
 void prepare_maru_after_device_init(void)
 {
+    make_vm_lock_os();
     init_device_hotplug();
     start_ecs();
     init_sdb(get_emul_vm_base_port() + SDB_UDP_SENSOR_INDEX);