From: xie xingguo Date: Thu, 29 Jun 2017 07:24:00 +0000 (+0800) Subject: os/bluestore/bluestore_tool: output error code correctly if we fail to mkdir X-Git-Tag: v12.1.2~100^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=130ad05f44c8eb9e9c0bb7b9800c93b300997362;p=ceph.git os/bluestore/bluestore_tool: output error code correctly if we fail to mkdir Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index d6ca7c2b19cd..213f01ac77f3 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -260,6 +260,7 @@ int main(int argc, char **argv) string full = out_dir + "/" + dir; r = ::mkdir(full.c_str(), 0755); if (r < 0) { + r = -errno; cerr << "mkdir " << full << " failed: " << cpp_strerror(r) << std::endl; exit(1); }