]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/health_check.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / mon / health_check.h
index 71e301159c25660e634dc119c46a7b84e28f6ac8..94adbcb3ef954b1d8dd8c6a39cb9c1cdb9f5feb5 100644 (file)
@@ -103,7 +103,7 @@ struct health_check_map_t {
   health_check_t& add(const std::string& code,
                      health_status_t severity,
                      const std::string& summary) {
-    assert(checks.count(code) == 0);
+    ceph_assert(checks.count(code) == 0);
     health_check_t& r = checks[code];
     r.severity = severity;
     r.summary = summary;
@@ -178,27 +178,13 @@ struct health_check_map_t {
     }
   }
 
-  void dump_detail(Formatter *f, std::string *plain, bool compat) const {
+  void dump_detail(std::string *plain) const {
     for (auto& p : checks) {
-      if (f) {
-       if (compat) {
-         // this is sloppy, but the best we can do: just dump all of the
-         // individual checks' details together
-         for (auto& d : p.second.detail) {
-           f->dump_string("item", d);
-         }
-       }
-      } else {
-       if (!compat) {
-         *plain += p.first + " " + p.second.summary + "\n";
-       }
-       for (auto& d : p.second.detail) {
-         if (!compat) {
-           *plain += "    ";
-         }
-         *plain += d;
-         *plain += "\n";
-       }
+      *plain += p.first + " " + p.second.summary + "\n";
+      for (auto& d : p.second.detail) {
+        *plain += "    ";
+        *plain += d;
+        *plain += "\n";
       }
     }
   }