]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: add new line break when get command descriptions 16687/head
authorsongweibin <song.weibin@zte.com.cn>
Thu, 17 Aug 2017 03:44:43 +0000 (11:44 +0800)
committersongweibin <song.weibin@zte.com.cn>
Fri, 18 Aug 2017 00:54:07 +0000 (08:54 +0800)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
src/common/admin_socket.cc

index 2bb767edcff7026e8a94f7bf6e967de9dd2282ed..dc15dbb84b9d7bcd7ceca940cb803a64cbff7ab4 100644 (file)
@@ -536,7 +536,7 @@ public:
   explicit GetdescsHook(AdminSocket *as) : m_as(as) {}
   bool call(string command, cmdmap_t &cmdmap, string format, bufferlist& out) override {
     int cmdnum = 0;
-    JSONFormatter jf(false);
+    JSONFormatter jf;
     jf.open_object_section("command_descriptions");
     for (map<string,string>::iterator p = m_as->m_descs.begin();
         p != m_as->m_descs.end();
@@ -550,6 +550,7 @@ public:
       cmdnum++;
     }
     jf.close_section(); // command_descriptions
+    jf.enable_line_break();
     ostringstream ss;
     jf.flush(ss);
     out.append(ss.str());