From 8532f521d75381aafb0285e2644ddd0c513971e7 Mon Sep 17 00:00:00 2001 From: huangke11 Date: Wed, 23 Mar 2022 10:25:01 +0800 Subject: [PATCH] =?UTF-8?q?config=5Fpolicy=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=BF=AE=E6=94=B9?= 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 +- .../innerkits/include/config_policy_utils.h | 4 ++-- test/resource/ohos_test.xml | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 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/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); 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