From ec0bcf51f1c31ad7db898678e339501e7b82d4f7 Mon Sep 17 00:00:00 2001 From: "junsuk77.oh" Date: Thu, 26 Dec 2013 08:22:52 +0900 Subject: [PATCH] fix : undefined reference to `__get_pkg_location' Change-Id: Ia4cb33e50aeaa045be48ef2cf7051923d48f7226 --- src/pkgmgr-info.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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"); -- 2.7.4