fix : undefined reference to `__get_pkg_location' 56/14156/3 accepted/tizen/ivi/release accepted/tizen/generic/20140106.140334 accepted/tizen/generic/20140108.092320 accepted/tizen/ivi/20131231.184200 accepted/tizen/ivi/release/20140108.212213 accepted/tizen/mobile/20140107.212826 submit/tizen/20131231.064147 submit/tizen/20140108.022427 submit/tizen_ivi_release/20140108.030126
authorjunsuk77.oh <junsuk77.oh@samsung.com>
Wed, 25 Dec 2013 23:22:52 +0000 (08:22 +0900)
committerjunsuk77.oh <junsuk77.oh@samsung.com>
Wed, 25 Dec 2013 23:24:34 +0000 (08:24 +0900)
Change-Id: Ia4cb33e50aeaa045be48ef2cf7051923d48f7226

src/pkgmgr-info.c

index b8eaa7a..4e03576 100755 (executable)
@@ -2210,6 +2210,25 @@ err:
        return ret;
 }
 
+static int __get_pkg_location(const char *pkgid)
+{
+       retvm_if(pkgid == NULL, PMINFO_R_OK, "pkginfo handle is NULL");
+
+       FILE *fp = NULL;
+       char pkg_mmc_path[FILENAME_MAX] = { 0, };
+       snprintf(pkg_mmc_path, FILENAME_MAX, "%s%s", PKG_SD_PATH, pkgid);
+
+       /*check whether application is in external memory or not */
+       fp = fopen(pkg_mmc_path, "r");
+       if (fp != NULL) {
+               fclose(fp);
+               fp = NULL;
+               return PMINFO_EXTERNAL_STORAGE;
+       }
+
+       return PMINFO_INTERNAL_STORAGE;
+}
+
 API int pkgmgrinfo_pkginfo_get_list(pkgmgrinfo_pkg_list_cb pkg_list_cb, void *user_data)
 {
        retvm_if(pkg_list_cb == NULL, PMINFO_R_EINVAL, "callback function is NULL\n");