From: xiexingguo <258156334@qq.com> Date: Wed, 23 Dec 2015 14:49:59 +0000 (+0800) Subject: KeyValueStore: fix return code of mkfs X-Git-Tag: v10.0.3~173^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a069ea994d8619299e933f39e33dada89491e2a6;p=ceph.git KeyValueStore: fix return code of mkfs It shall return a negative result code instead. Signed-off-by: xie xingguo --- diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 81b07d7ab797..f9489f20d7d2 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -649,7 +649,7 @@ int KeyValueStore::mkfs() goto close_fsid_fd; } if (::fsync(fsid_fd) < 0) { - ret = errno; + ret = -errno; derr << "mkfs: close failed: can't write fsid: " << cpp_strerror(ret) << dendl; goto close_fsid_fd;