From: Ilho Kim Date: Fri, 23 Apr 2021 10:27:11 +0000 (+0900) Subject: Implement res_type filter X-Git-Tag: submit/tizen/20210617.070222~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8973b9fb1c0c1682da2a2120fd0874157897a289;p=platform%2Fcore%2Fappfw%2Fpkgmgr-tool.git Implement res_type filter Requires: - https://review.tizen.org/gerrit/#/c/platform/core/appfw/pkgmgr-info/+/251170/ Change-Id: Idba4833ba6efb42ecda69b30302d68c78a71c9f8 Signed-off-by: Ilho Kim --- diff --git a/src/pkginfo/pkg_info.c b/src/pkginfo/pkg_info.c index a8cc4da..1886a2f 100644 --- a/src/pkginfo/pkg_info.c +++ b/src/pkginfo/pkg_info.c @@ -678,6 +678,7 @@ static int __add_pkg_filter(uid_t uid) printf("14 --> filter by package installed storage[installed_internal | installed_external]\n"); printf("15 --> filter by package privilege\n"); printf("16 --> filter by package support disable [0|1]\n"); + printf("17 --> filter by package res type\n"); choice = __get_integer_input_data(); switch (choice) { case 0: @@ -872,6 +873,19 @@ static int __add_pkg_filter(uid_t uid) goto err; } break; + case 17: + value = __get_string_input_data(); + ret = pkgmgrinfo_pkginfo_filter_add_string(handle, + PMINFO_PKGINFO_PROP_PACKAGE_RES_TYPE, + value); + if (ret < 0) { + printf("pkgmgrinfo_pkginfo_filter_add_string() failed\n"); + ret = -1; + goto err; + } + free(value); + value = NULL; + break; default: printf("Invalid filter property\n"); ret = -1;