From 4cd5c3bf3f4d2db53a8ab4aeb539e4a4bd849812 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 6 Dec 2013 13:48:42 -0800 Subject: [PATCH] Monitor: expose local monitor commands to other compilation units Signed-off-by: Greg Farnum --- src/mon/Monitor.cc | 6 ++++++ src/mon/Monitor.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index b35269baf15df..136c42672a16b 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -1945,6 +1945,12 @@ void get_command_descriptions(const MonCommand *commands, f->flush(*rdata); } +void get_locally_supported_monitor_commands(const MonCommand **cmds, int *count) +{ + *cmds = mon_commands; + *count = ARRAY_SIZE(mon_commands); +} + void Monitor::handle_command(MMonCommand *m) { if (m->fsid != monmap->fsid) { diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 679ae39450b88..cfb9f549c398e 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -910,5 +910,6 @@ void get_command_descriptions(const MonCommand *commands, unsigned commands_size, Formatter *f, bufferlist *rdata); +void get_locally_supported_monitor_commands(const MonCommand **cmds, int *count); #endif -- 2.39.5