From: junsuk77.oh Date: Wed, 25 Dec 2013 23:22:52 +0000 (+0900) Subject: fix : undefined reference to `__get_pkg_location' X-Git-Tag: accepted/tizen/generic/20140106.140334^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen%2Fivi%2Frelease;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git fix : undefined reference to `__get_pkg_location' Change-Id: Ia4cb33e50aeaa045be48ef2cf7051923d48f7226 --- diff --git a/src/pkgmgr-info.c b/src/pkgmgr-info.c index b8eaa7a..4e03576 100755 --- a/src/pkgmgr-info.c +++ b/src/pkgmgr-info.c @@ -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");