]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: return error message string when no other output string specified
authorSage Weil <sage@newdream.net>
Tue, 23 Aug 2011 19:26:32 +0000 (12:26 -0700)
committerSage Weil <sage@newdream.net>
Tue, 23 Aug 2011 19:26:32 +0000 (12:26 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/OSDMonitor.cc

index c0470f4aabc0032bd4f9152aef093967167c0889..68879c4e6e6eb7d5cbab13a472d99f36dc578f58 100644 (file)
@@ -37,6 +37,7 @@
 #include "common/ceph_argparse.h"
 
 #include "common/config.h"
+#include "common/errno.h"
 
 #include <sstream>
 
@@ -1857,6 +1858,8 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
   }
 out:
   getline(ss, rs);
+  if (err < 0 && rs.length() == 0)
+    rs = cpp_strerror(err);
   mon->reply_command(m, err, rs, paxos->get_version());
   return false;
 }