diff --git a/configure.ac b/configure.ac index 4fe7b9dbe65..44d5e3478ac 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ AC_PREREQ(2.59) # NOTE: This version is _only_ used for naming the tarball. The # VERSION define is not used by the code. It gets a version string # from 'git describe'; see src/ceph_ver.[ch] -AC_INIT([ceph], [0.35], [ceph-devel@vger.kernel.org]) +AC_INIT([ceph], [0.36], [ceph-devel@vger.kernel.org]) AC_CONFIG_SUBDIRS([src/gtest]) diff --git a/debian/changelog b/debian/changelog index b1aa33986b3..70c9c4b0cae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ceph (0.36-1) experimental; urgency=low + + * New upstream release + + -- Sage Weil Fri, 30 Sep 2011 09:29:29 -0700 + ceph (0.35-1) experimental; urgency=low * New upstream release diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index d6026390241..c18045a0515 100644 --- a/src/tools/ceph.cc +++ b/src/tools/ceph.cc @@ -136,11 +136,9 @@ int main(int argc, const char **argv) // output int out_fd; - if (out_file.empty()) { - out_fd = ::open("/dev/null", O_WRONLY); - out_file = "/dev/null"; - } else if (out_file == "-") { - out_fd = dup(STDOUT_FILENO); + bool close_out_fd = false; + if (out_file.empty() || out_file == "-") { + out_fd = STDOUT_FILENO; } else { out_fd = TEMP_FAILURE_RETRY(::open(out_file.c_str(), O_WRONLY|O_CREAT|O_TRUNC, 0644)); if (out_fd < 0) { @@ -149,6 +147,7 @@ int main(int argc, const char **argv) << cpp_strerror(ret) << dendl; return 1; } + close_out_fd = true; } CephToolCtx *ctx = ceph_tool_common_init(mode, concise); @@ -195,7 +194,8 @@ int main(int argc, const char **argv) << cpp_strerror(err) << dendl; goto out; } - derr << " wrote " << obl.length() << " byte payload to " << out_file << dendl; + if (!concise && !out_file.empty()) + cerr << " wrote " << obl.length() << " byte payload to " << out_file << std::endl; } } } @@ -212,7 +212,8 @@ int main(int argc, const char **argv) } out: - ::close(out_fd); + if (close_out_fd) + ::close(out_fd); if (ceph_tool_common_shutdown(ctx)) ret = 1; return ret;