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=refs%2Fpull%2F7036%2Fhead;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 81b07d7ab79..f9489f20d7d 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;