From 1b307c93093359ffcc7025041217ca477ef4185f Mon Sep 17 00:00:00 2001 From: huangke11 Date: Mon, 21 Mar 2022 11:52:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?config=5Fpolicy=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangke11 --- .../config_policy/src/config_policy_utils.c | 2 +- test/resource/ohos_test.xml | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/frameworks/config_policy/src/config_policy_utils.c b/frameworks/config_policy/src/config_policy_utils.c index 4e80e3a..7008418 100644 --- a/frameworks/config_policy/src/config_policy_utils.c +++ b/frameworks/config_policy/src/config_policy_utils.c @@ -49,7 +49,7 @@ static void GetCfgDirRealPolicyValue(CfgDir *res) if (res == NULL) { return; } - res->realPolicyValue = strdup("/system/etc:/chipset/etc:/sys-prod/etc:/chip-prod/etc"); + res->realPolicyValue = strdup("/system:/chipset:/sys_prod:/chip_prod"); } char *GetOneCfgFile(const char *pathSuffix, char *buf, unsigned int bufLength) diff --git a/test/resource/ohos_test.xml b/test/resource/ohos_test.xml index 4fff2f7..bef5f40 100644 --- a/test/resource/ohos_test.xml +++ b/test/resource/ohos_test.xml @@ -16,18 +16,18 @@ - -- Gitee From a69de613d6f88b593b3ace9148008430cb663864 Mon Sep 17 00:00:00 2001 From: huangke11 Date: Tue, 22 Mar 2022 15:18:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangke11 --- interfaces/innerkits/include/config_policy_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/innerkits/include/config_policy_utils.h b/interfaces/innerkits/include/config_policy_utils.h index 9fea813..9b39afc 100644 --- a/interfaces/innerkits/include/config_policy_utils.h +++ b/interfaces/innerkits/include/config_policy_utils.h @@ -46,13 +46,13 @@ void FreeCfgFiles(CfgFiles *res); void FreeCfgDirList(CfgDir *res); // get the highest priority config file -// pathSuffixStr: the relative path of the config file, e.g. "xml/config.xml" +// pathSuffixStr: the relative path of the config file, e.g. "etc/xml/config.xml" // buf: recommended buffer length is MAX_PATH_LEN // return: path of the highest priority config file, return '\0' when such a file is not found char *GetOneCfgFile(const char *pathSuffix, char *buf, unsigned int bufLength); // get config files, ordered by priority from low to high -// pathSuffixStr: the relative path of the config file, e.g. "xml/config.xml" +// pathSuffixStr: the relative path of the config file, e.g. "etc/xml/config.xml" // return: paths of config files // CAUTION: please use FreeCfgFiles() to avoid memory leak. CfgFiles *GetCfgFiles(const char *pathSuffix); -- Gitee