mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
config: make meta expansion in set_val optional
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
72edd353f4
commit
500c72e8ee
@ -584,7 +584,7 @@ void md_config_t::set_val_or_die(const char *key, const char *val)
|
||||
assert(ret == 0);
|
||||
}
|
||||
|
||||
int md_config_t::set_val(const char *key, const char *val)
|
||||
int md_config_t::set_val(const char *key, const char *val, bool meta)
|
||||
{
|
||||
Mutex::Locker l(lock);
|
||||
if (!key)
|
||||
@ -593,7 +593,8 @@ int md_config_t::set_val(const char *key, const char *val)
|
||||
return -EINVAL;
|
||||
|
||||
std::string v(val);
|
||||
expand_meta(v);
|
||||
if (meta)
|
||||
expand_meta(v);
|
||||
|
||||
string k(ConfFile::normalize_key_name(key));
|
||||
|
||||
|
@ -121,7 +121,7 @@ public:
|
||||
|
||||
// Set a configuration value.
|
||||
// Metavariables will be expanded.
|
||||
int set_val(const char *key, const char *val);
|
||||
int set_val(const char *key, const char *val, bool meta=true);
|
||||
|
||||
// Get a configuration value.
|
||||
// No metavariables will be returned (they will have already been expanded)
|
||||
|
Loading…
Reference in New Issue
Block a user