]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonitorDBStore: fix bug in dump output file
authorSage Weil <sage@redhat.com>
Tue, 3 May 2016 12:50:43 +0000 (08:50 -0400)
committerBoris Ranto <branto@redhat.com>
Fri, 6 May 2016 11:44:17 +0000 (13:44 +0200)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonitorDBStore.h

index cbb0b33ed9b79fb0686b75712f7f856e08b6cbbf..a935d1f9aede4577b6f976b39b946f4026edd78e 100644 (file)
@@ -654,7 +654,7 @@ class MonitorDBStore
         dump_fd_binary = ::open(
           g_conf->mon_debug_dump_location.c_str(),
           O_CREAT|O_APPEND|O_WRONLY, 0644);
-        if (!dump_fd_binary) {
+        if (dump_fd_binary < 0) {
           dump_fd_binary = -errno;
           derr << "Could not open log file, got "
                << cpp_strerror(dump_fd_binary) << dendl;