printout of cluster config to use same tokens as documentation

parent 2f01676b
...@@ -2367,7 +2367,15 @@ ConfigInfo::isSection(const char * section) const { ...@@ -2367,7 +2367,15 @@ ConfigInfo::isSection(const char * section) const {
} }
const char* const char*
ConfigInfo::getAlias(const char * section) const { ConfigInfo::nameToAlias(const char * name) {
for (int i = 0; m_sectionNameAliases[i].name != 0; i++)
if(!strcasecmp(name, m_sectionNameAliases[i].name))
return m_sectionNameAliases[i].alias;
return 0;
}
const char*
ConfigInfo::getAlias(const char * section) {
for (int i = 0; m_sectionNameAliases[i].name != 0; i++) for (int i = 0; m_sectionNameAliases[i].name != 0; i++)
if(!strcasecmp(section, m_sectionNameAliases[i].alias)) if(!strcasecmp(section, m_sectionNameAliases[i].alias))
return m_sectionNameAliases[i].name; return m_sectionNameAliases[i].name;
...@@ -3416,7 +3424,10 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){ ...@@ -3416,7 +3424,10 @@ saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){
} }
if (g_print_full_config) if (g_print_full_config)
printf("[%s]\n", ctx.fname); {
const char *alias= ConfigInfo::nameToAlias(ctx.fname);
printf("[%s]\n", alias ? alias : ctx.fname);
}
Uint32 no = 0; Uint32 no = 0;
ctx.m_userProperties.get("$Section", id, &no); ctx.m_userProperties.get("$Section", id, &no);
......
...@@ -105,7 +105,8 @@ public: ...@@ -105,7 +105,8 @@ public:
* @note Result is not defined if section/name are wrong! * @note Result is not defined if section/name are wrong!
*/ */
bool verify(const Properties* secti, const char* fname, Uint64 value) const; bool verify(const Properties* secti, const char* fname, Uint64 value) const;
const char* getAlias(const char*) const; static const char* nameToAlias(const char*);
static const char* getAlias(const char*);
bool isSection(const char*) const; bool isSection(const char*) const;
const char* getDescription(const Properties * sec, const char* fname) const; const char* getDescription(const Properties * sec, const char* fname) const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment