From 39c68d128cf29f8e0a617009d16c5edf471ead47 Mon Sep 17 00:00:00 2001 From: Yao Zongyou Date: Sat, 28 Oct 2017 18:23:30 +0800 Subject: [PATCH] ceph-bluestore-tool: the link target should not ending with new line Signed-off-by: Yao Zongyou --- src/os/bluestore/bluestore_tool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/bluestore_tool.cc b/src/os/bluestore/bluestore_tool.cc index d41b5052a505..6811b6a338d4 100644 --- a/src/os/bluestore/bluestore_tool.cc +++ b/src/os/bluestore/bluestore_tool.cc @@ -332,7 +332,6 @@ int main(int argc, char **argv) v += label.meta["whoami"]; v += "]\nkey = " + i->second; } - v += "\n"; if (k.find("path_") == 0) { p = path + "/" + k.substr(5); int r = ::symlink(v.c_str(), p.c_str()); @@ -361,6 +360,7 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } } else { + v += "\n"; int fd = ::open(p.c_str(), O_CREAT|O_TRUNC|O_WRONLY, 0600); if (fd < 0) { cerr << "error writing " << p << ": " << cpp_strerror(errno) -- 2.47.3