From bb45621cb117131707a85154292a3b3cdd1c662a Mon Sep 17 00:00:00 2001 From: Adam Crume Date: Thu, 18 Sep 2014 16:57:27 -0700 Subject: [PATCH] common: Add cctid meta variable Fixes: #6228 Signed-off-by: Adam Crume --- src/common/config.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/config.cc b/src/common/config.cc index a968cb77a694a..88f443d86e06c 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -947,7 +947,7 @@ int md_config_t::set_val_raw(const char *val, const config_option *opt) } static const char *CONF_METAVARIABLES[] = - { "cluster", "type", "name", "host", "num", "id", "pid" }; + { "cluster", "type", "name", "host", "num", "id", "pid", "cctid" }; static const int NUM_CONF_METAVARIABLES = (sizeof(CONF_METAVARIABLES) / sizeof(CONF_METAVARIABLES[0])); @@ -1059,6 +1059,8 @@ bool md_config_t::expand_meta(std::string &origval, out += name.get_id().c_str(); else if (var == "pid") out += stringify(getpid()); + else if (var == "cctid") + out += stringify((unsigned long long)this); else assert(0); // unreachable expanded = true; -- 2.39.5