From: Sage Weil Date: Tue, 6 Mar 2018 20:21:28 +0000 (-0600) Subject: common/config: normalize key name for get_val (external) variants X-Git-Tag: v13.0.2~78^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5597f0b2bc4ef354897999ee21cea855b7bc709;p=ceph.git common/config: normalize key name for get_val (external) variants Signed-off-by: Sage Weil --- diff --git a/src/common/config.cc b/src/common/config.cc index 5e8f7452c3fa..a1f0fbdbf2ed 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -987,7 +987,8 @@ void md_config_t::get_config_bl( int md_config_t::get_val(const std::string &key, char **buf, int len) const { Mutex::Locker l(lock); - return _get_val_cstr(key, buf, len); + string k(ConfFile::normalize_key_name(key)); + return _get_val_cstr(k, buf, len); } int md_config_t::get_val( @@ -1000,7 +1001,8 @@ int md_config_t::get_val( Option::value_t md_config_t::get_val_generic(const std::string &key) const { Mutex::Locker l(lock); - return _get_val(key); + string k(ConfFile::normalize_key_name(key)); + return _get_val(k); } Option::value_t md_config_t::_get_val(