]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/bluestore_tool: output error code correctly if we fail to mkdir
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 29 Jun 2017 07:24:00 +0000 (15:24 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 29 Jun 2017 07:24:00 +0000 (15:24 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/bluestore_tool.cc

index d6ca7c2b19cd87aa1045b7f8efa0847a517764a3..213f01ac77f33f8eea0824b4584a91f87d5c0888 100644 (file)
@@ -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);
       }