string format;
cmd_getval(g_ceph_context, cmdmap, "format", format, string("json-pretty"));
boost::scoped_ptr<Formatter> f(new_formatter(format));
+ if (!f)
+ f.reset(new_formatter("json-pretty"));
f->open_object_section("osd_location");
f->dump_int("osd", osd);
string format;
cmd_getval(g_ceph_context, cmdmap, "format", format, string("json-pretty"));
boost::scoped_ptr<Formatter> f(new_formatter(format));
+ if (!f)
+ f.reset(new_formatter("json-pretty"));
f->open_object_section("osd_metadata");
r = dump_osd_metadata(osd, f.get(), &ss);
if (r < 0)