From: Loic Dachary Date: Thu, 4 Dec 2014 23:07:59 +0000 (+0100) Subject: Merge pull request #3031 from dachary/wip-10199-config-get-xml X-Git-Tag: v0.92~32^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=744c309e1df87e0a6d32ca1b2dec6159fd27c98b;p=ceph.git Merge pull request #3031 from dachary/wip-10199-config-get-xml common: admin sock output XML elements whitespace Reviewed-by: Sahid Orentino Ferdjaoui --- 744c309e1df87e0a6d32ca1b2dec6159fd27c98b diff --cc src/common/ceph_context.cc index 66c38bdd7319,a8633b1520d0..cac89f1e3e3e --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@@ -190,17 -192,10 +192,19 @@@ void CephContext::do_command(std::strin command == "perf schema") { _perf_counters_collection->dump_formatted(f, true); } + else if (command == "perf reset") { + std::string var; + if (!cmd_getval(this, cmdmap, "var", var)) { + f->dump_string("error", "syntax error: 'perf reset '"); + } else { + if(!_perf_counters_collection->reset(var)) + f->dump_stream("error") << "Not find: " << var; + } + } else { - f->open_object_section(command.c_str()); + string section = command; + boost::replace_all(section, " ", "_"); + f->open_object_section(section.c_str()); if (command == "config show") { _conf->show_config(f); }