From 7d4ae77521f705499b16ecc1a46f1bf77da8ee24 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 21 Feb 2022 17:47:03 +0800 Subject: [PATCH] rename var --- source/libs/config/inc/cfgInt.h | 2 +- source/libs/config/src/{cfgTaosFile.c => cfgCfgFile.c} | 2 +- source/libs/config/src/config.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename source/libs/config/src/{cfgTaosFile.c => cfgCfgFile.c} (91%) diff --git a/source/libs/config/inc/cfgInt.h b/source/libs/config/inc/cfgInt.h index e441e401fb..56cc58e658 100644 --- a/source/libs/config/inc/cfgInt.h +++ b/source/libs/config/inc/cfgInt.h @@ -31,7 +31,7 @@ typedef struct SConfig { SHashObj *hash; } SConfig; -int32_t cfgLoadFromTaosFile(SConfig *pConfig, const char *filepath); +int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath); int32_t cfgLoadFromDotEnvFile(SConfig *pConfig, const char *filepath); int32_t cfgLoadFromGlobalEnvVariable(SConfig *pConfig); int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url); diff --git a/source/libs/config/src/cfgTaosFile.c b/source/libs/config/src/cfgCfgFile.c similarity index 91% rename from source/libs/config/src/cfgTaosFile.c rename to source/libs/config/src/cfgCfgFile.c index 7d5b4e4743..9cf36997eb 100644 --- a/source/libs/config/src/cfgTaosFile.c +++ b/source/libs/config/src/cfgCfgFile.c @@ -16,7 +16,7 @@ #define _DEFAULT_SOURCE #include "cfgInt.h" -int32_t cfgLoadFromTaosFile(SConfig *pConfig, const char *filepath) { +int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) { uInfo("load from .cfg file %s", filepath); return 0; } \ No newline at end of file diff --git a/source/libs/config/src/config.c b/source/libs/config/src/config.c index 77cde8221e..9650489655 100644 --- a/source/libs/config/src/config.c +++ b/source/libs/config/src/config.c @@ -36,7 +36,7 @@ SConfig *cfgInit() { int32_t cfgLoad(SConfig *pConfig, ECfgSrcType cfgType, const char *sourceStr) { switch (cfgType) { case CFG_TYPE_CFG_FILE: - return cfgLoadFromTaosFile(pConfig, sourceStr); + return cfgLoadFromCfgFile(pConfig, sourceStr); case CFG_TYPE_DOT_ENV: return cfgLoadFromDotEnvFile(pConfig, sourceStr); case CFG_TYPE_ENV_VAR: -- GitLab