Revert "Supporting Internal Media Path Compatibility" 02/87202/2 accepted/tizen/common/20160907.154419 accepted/tizen/ivi/20160908.122756 accepted/tizen/mobile/20160908.122708 accepted/tizen/tv/20160908.122722 accepted/tizen/wearable/20160908.122737 submit/tizen/20160907.043316
authorKunhoon Baik <knhoon.baik@samsung.com>
Wed, 7 Sep 2016 04:09:48 +0000 (21:09 -0700)
committerKunhoon Baik <knhoon.baik@samsung.com>
Wed, 7 Sep 2016 04:10:01 +0000 (21:10 -0700)
This reverts commit 23de75841e9bb1a712b06352b71d9107302c06e9.

Change-Id: Id20c18851b7dfd2aa3f4d8dd14b446f7e7f7cc30

CMakeLists.txt
packaging/libstorage.spec
src/storage-internal.c

index a8c5f4b..55924cd 100644 (file)
@@ -18,7 +18,6 @@ SET(dependents
                gio-2.0
                libtzplatform-config
                capi-system-system-settings
-               mount
 )
 SET(pc_dependents "capi-base-common")
 
index ee26b84..0204e53 100644 (file)
@@ -14,7 +14,6 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(capi-system-system-settings)
-BuildRequires:  pkgconfig(mount)
 
 %description
 development package of library to get storage
index 8713a12..1867def 100755 (executable)
 #include <limits.h>
 #include <sys/statvfs.h>
 #include <tzplatform_config.h>
-#include <libmount.h>
 
 #include "common.h"
 #include "log.h"
 
-#define COMPAT_DIR "/opt/usr/media"
 
 #ifndef __USE_FILE_OFFSET64
 int __WEAK__ storage_get_internal_memory_size(struct statvfs *buf);
@@ -62,32 +60,7 @@ static int internal_get_space(unsigned long long *total, unsigned long long *ava
 
 static const char *internal_get_root(void)
 {
-       struct libmnt_table *t = NULL;
-       int r = 0;
-       struct libmnt_fs *fs;
-       const char *ret;
-
-       ret = tzplatform_getenv(TZ_USER_CONTENT);
-
-       t = mnt_new_table();
-       if(!t)
-               return ret;
-
-       r = mnt_table_parse_mtab(t, NULL);
-       if(r < 0){
-               mnt_free_table(t);
-               return ret;
-       }
-
-       fs = mnt_table_find_target(t,COMPAT_DIR,MNT_ITER_BACKWARD);
-       if(fs){
-               // TODO : mnt_fs_get_root(fs) should be matched to tzplatform_getenv(TZ_USER_CONTENT).
-               ret = COMPAT_DIR;
-       }
-
-       mnt_free_table(t);
-
-       return ret;
+       return tzplatform_getenv(TZ_USER_CONTENT);
 }
 
 const struct storage_ops internal = {