From 410906e04936c935903526f26fb7db16c412a711 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Thu, 10 Jan 2013 18:54:12 +0000 Subject: [PATCH] mon: OSDMonitor: don't output to stdout in plain text if json is specified Fixes: #3748 Signed-off-by: Joao Eduardo Luis Reviewed-by: Sage Weil --- src/mon/OSDMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ad17d1aa2a4e0..449b9f48cdf40 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1753,7 +1753,8 @@ bool OSDMonitor::preprocess_command(MMonCommand *m) } if (r == 0) { rdata.append(ds); - ss << "dumped osdmap epoch " << p->get_epoch(); + if (format != "json") + ss << " "; } } else if (cmd == "ls") { stringstream ds; -- 2.39.5