Update mount point for OSP-compatible applications 90/14090/1
authorHyunbin Lee <hyunbin.lee@samsung.com>
Fri, 29 Nov 2013 08:45:22 +0000 (17:45 +0900)
committerHyunbin Lee <hyunbin.lee@samsung.com>
Mon, 23 Dec 2013 06:55:24 +0000 (15:55 +0900)
Change-Id: I83d3af99c48cc6f1e60de836018ab881ea001147
Signed-off-by: Hyunbin Lee <hyunbin.lee@samsung.com>
src/osp-env-config.c

index 198c005..7db9d74 100644 (file)
@@ -222,6 +222,7 @@ mount_native_paths(const char* app_rootpath)
                { "/lib",                               "./lib" },
                { "/mnt",                               "./mnt" },
                { "/proc",                              "./proc" },
+               { "/run",                               "./run" },
                { "/smack",                             "./smack" },
                { "/sys",                               "./sys" },
                { "/sys/kernel/debug",  "./sys/kernel/debug" },
@@ -244,6 +245,7 @@ mount_native_paths(const char* app_rootpath)
 
        for (i = 0; i < sizeof(mount_info)/sizeof(struct _path_info); ++i)
        {
+               LOGI("mount src: %s, dest: %s", mount_info[i].src_path, mount_info[i].dest_path);
                if (mount(mount_info[i].src_path, mount_info[i].dest_path, NULL, MS_BIND | MS_PRIVATE, NULL) != 0)
                {
                        LOGE("mount() failed, src path: %s, dest path: %s, errno: %d (%s)",
@@ -298,6 +300,7 @@ mount_osp_internal_paths(const char* app_rootpath, const char* pkgid)
 
        for (i = 0; i < sizeof(mount_info1)/sizeof(struct _path_info); ++i)
        {
+               LOGI("mount src: %s, dest: %s", mount_info1[i].src_path, mount_info1[i].dest_path);
                if (mount(mount_info1[i].src_path, mount_info1[i].dest_path, NULL, MS_BIND | MS_PRIVATE, NULL) != 0)
                {
                        LOGE("mount() failed, src path: %s, dest path: %s, errno: %d (%s)",
@@ -313,6 +316,7 @@ mount_osp_internal_paths(const char* app_rootpath, const char* pkgid)
        }
        for (i = 0; i < sizeof(mount_info2)/sizeof(struct _path_info); ++i)
        {
+               LOGI("mount src: %s, dest: %s", mount_info2[i].src_path, mount_info2[i].dest_path);
                if (mount(mount_info2[i].src_path, mount_info2[i].dest_path, NULL, MS_BIND | MS_PRIVATE, NULL) != 0)
                {
                        LOGE("mount() failed, src path: %s, dest path: %s, errno: %d (%s)",
@@ -369,9 +373,10 @@ mount_linux_paths(const char* app_rootpath)
                return -1;
        }
 
-       for (i = 0; i < sizeof(mount_info)/sizeof(struct _path_info); ++i)
+       int count = sizeof(mount_info)/sizeof(struct _path_info);
+       for (i = 0; i < count; ++i)
        {
-               if (i == 23) // /opt/storage/sdcard
+               if (i == (count - 1)) // /opt/storage/sdcard
                {
                        int mmc_mounted = 0;
                        int ret = vconf_get_int(VCONFKEY_SYSMAN_MMC_STATUS, &mmc_mounted);
@@ -532,6 +537,7 @@ mount_osp_external_paths(const char* app_rootpath, const char* pkgid)
 
        for (i = 0; i < sizeof(mount_info1)/sizeof(struct _path_info); i++)
        {
+               LOGI("src path: %s, dest path: %s", mount_info1[i].src_path, mount_info1[i].dest_path);
                if (mount(mount_info1[i].src_path, mount_info1[i].dest_path, NULL, MS_BIND | MS_PRIVATE, NULL) != 0)
                {
                        LOGE("mount() failed, src path: %s, dest path: %s, errno: %d (%s)",
@@ -547,6 +553,7 @@ mount_osp_external_paths(const char* app_rootpath, const char* pkgid)
        }
        for (i = 0; i < sizeof(mount_info2)/sizeof(struct _path_info); i++)
        {
+               LOGI("src path: %s, dest path: %s", mount_info2[i].src_path, mount_info2[i].dest_path);
                if (mount(mount_info2[i].src_path, mount_info2[i].dest_path, NULL, MS_BIND | MS_PRIVATE, NULL) != 0)
                {
                        LOGE("mount() failed, src path: %s, dest path: %s, errno: %d (%s)",
@@ -617,6 +624,7 @@ change_mount_mode(unsigned long mountflags)
                { "/opt/storage/sdcard" },
                { "/opt/usr" },
                { "/opt/var/run" },
+               { "/run" },
                { "/sys" },
                { "/usr/share/locale" },
                { "/var" }