return locale;
}
+int __pkginfo_check_installed_storage(package_x *pkginfo)
+{
+ char buf[MAX_QUERY_LEN] = {'\0'};
+ retvm_if(pkginfo->package == NULL, PMINFO_R_OK, "pkgid is NULL\n");
+ retvm_if(pkginfo->installed_storage == NULL, PMINFO_R_ERROR,
+ "installed_storage is NULL\n");
+
+ if (strcmp(pkginfo->installed_storage, "installed_external") == 0) {
+ snprintf(buf, MAX_QUERY_LEN - 1, "%s", pkginfo->external_path);
+ if (access(buf, R_OK) != 0) {
+ _LOGE("can not access [%s]", buf);
+ return PMINFO_R_ERROR;
+ }
+ }
+
+ return PMINFO_R_OK;
+}
+
+int __appinfo_check_installed_storage(application_x *appinfo)
+{
+ retvm_if(appinfo->installed_storage == NULL, PMINFO_R_ERROR,
+ "installed_storage is NULL\n");
+
+ if (strcmp(appinfo->installed_storage, "installed_external") == 0) {
+ retvm_if(appinfo->external_path == NULL, PMINFO_R_ERROR,
+ "external path is NULL\n");
+ if (access(appinfo->external_path, R_OK) != 0) {
+ _LOGE("can not access [%s]", appinfo->external_path);
+ return PMINFO_R_ERROR;
+ }
+ }
+
+ return PMINFO_R_OK;
+}
+