From 051c4a36579d85a2135f19b5b458fc605ca62efe Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Aug 2011 12:26:32 -0700 Subject: [PATCH] mon: return error message string when no other output string specified Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index c0470f4aabc00..68879c4e6e6eb 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -37,6 +37,7 @@ #include "common/ceph_argparse.h" #include "common/config.h" +#include "common/errno.h" #include @@ -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; } -- 2.39.5