summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunbin Lee <hyunbin.lee@samsung.com>2013-11-29 17:45:22 +0900
committerHyunbin Lee <hyunbin.lee@samsung.com>2013-12-23 15:55:24 +0900
commitc08f1de1c5ee12927dddf7a0e1f7059f7e47f57c (patch)
treebc3f733a1910ba7bec2809d8d7461f69264e5220
parent9fd76ae15cf6ceb781fb7b625984be61cce11934 (diff)
downloadenv-config-c08f1de1c5ee12927dddf7a0e1f7059f7e47f57c.tar.gz
env-config-c08f1de1c5ee12927dddf7a0e1f7059f7e47f57c.tar.bz2
env-config-c08f1de1c5ee12927dddf7a0e1f7059f7e47f57c.zip
Update mount point for OSP-compatible applications
Change-Id: I83d3af99c48cc6f1e60de836018ab881ea001147 Signed-off-by: Hyunbin Lee <hyunbin.lee@samsung.com>
-rw-r--r--src/osp-env-config.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/osp-env-config.c b/src/osp-env-config.c
index 198c005..7db9d74 100644
--- a/src/osp-env-config.c
+++ b/src/osp-env-config.c
@@ -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" }