Remove hardcoded path 81/23081/1
authorJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Tue, 17 Jun 2014 08:26:10 +0000 (10:26 +0200)
committerJean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Tue, 17 Jun 2014 08:31:34 +0000 (10:31 +0200)
All user data are in home

Bug-Tizen: TC-346

Change-Id: I7bedb30f4e6f799bf1d50d933733cc2115f2e3b4
Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
src/power/power-handler.c

index 0d4f1b6..1721dfd 100755 (executable)
@@ -150,10 +150,15 @@ static void poweroff_control_cb(keynode_t *in_key, struct ss_main_data *ad)
 /* umount usr data partition */
 static void unmount_rw_partition()
 {
-       char buf[256];
-       int ret;
-       ret =  umount2("/opt/usr", MNT_DETACH);
-       _D("/opt/usr unmount : %d", ret);
+       char *buf;
+       int ret,len;
+
+       len = snprintf(NULL,0,"%s",tzplatform_getenv(TZ_SYS_HOME));
+       buf = malloc(len +1);
+       snprintf(buf,len,"%s",tzplatform_getenv(TZ_SYS_HOME));
+       ret =  umount2(buf, MNT_DETACH);
+       _D("%s unmount : %d",buf, ret);
+       free(buf);
        sleep(1);
 }