From a069ea994d8619299e933f39e33dada89491e2a6 Mon Sep 17 00:00:00 2001 From: xiexingguo <258156334@qq.com> Date: Wed, 23 Dec 2015 22:49:59 +0800 Subject: [PATCH] KeyValueStore: fix return code of mkfs It shall return a negative result code instead. Signed-off-by: xie xingguo --- src/os/KeyValueStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 81b07d7ab7977..f9489f20d7d2f 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; -- 2.39.5