]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/admin_socket.cc
update sources to v12.1.0
[ceph.git] / ceph / src / common / admin_socket.cc
index 711d2040b170f9422e078a5f2d5b24f1b9c9d9d0..2bb767edcff7026e8a94f7bf6e967de9dd2282ed 100644 (file)
  * 
  */
 
-#include "include/int_types.h"
-
-#include "common/Thread.h"
 #include "common/admin_socket.h"
 #include "common/admin_socket_client.h"
-#include "common/config.h"
-#include "common/cmdparse.h"
-#include "common/dout.h"
 #include "common/errno.h"
-#include "common/perf_counters.h"
 #include "common/pipe.h"
 #include "common/safe_io.h"
 #include "common/version.h"
-#include "common/Formatter.h"
+#include "include/compat.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <map>
 #include <poll.h>
-#include <set>
-#include <sstream>
-#include <stdint.h>
-#include <string.h>
-#include <string>
-#include <sys/socket.h>
-#include <sys/types.h>
 #include <sys/un.h>
-#include <unistd.h>
 
-#include "include/compat.h"
+// re-include our assert to clobber the system one; fix dout:
+#include "include/assert.h"
 
 #define dout_subsys ceph_subsys_asok
 #undef dout_prefix
@@ -509,10 +492,13 @@ public:
     } else {
       JSONFormatter jf;
       jf.open_object_section("version");
-      if (command == "version")
+      if (command == "version") {
        jf.dump_string("version", ceph_version_to_str());
-      else if (command == "git_version")
+       jf.dump_string("release", ceph_release_name(ceph_release()));
+       jf.dump_string("release_type", ceph_release_type());
+      } else if (command == "git_version") {
        jf.dump_string("git_version", git_version_to_str());
+      }
       ostringstream ss;
       jf.close_section();
       jf.flush(ss);