From 61b4a655a56131f74e041efbf732bf0d0bf19e21 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 20 May 2008 10:11:46 -0700 Subject: [PATCH] osd: fix fakestore error msg --- src/osd/FakeStore.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/FakeStore.cc b/src/osd/FakeStore.cc index aa89fb5c0f87d..cb356665841da 100644 --- a/src/osd/FakeStore.cc +++ b/src/osd/FakeStore.cc @@ -282,7 +282,7 @@ int FakeStore::mount() if (r == 0) { dout(0) << "mount detected btrfs" << dendl; } else { - dout(0) << "mount did NOT detect btrfs: " << strerror(r) << dendl; + dout(0) << "mount did NOT detect btrfs: " << strerror(-r) << dendl; ::close(btrfs_fd); btrfs_fd = -1; } @@ -359,10 +359,10 @@ int FakeStore::transaction_start() int fd = ::open(basedir.c_str(), O_RDONLY); if (fd < 0) - derr(0) << "transaction_start got " << strerror(fd) + derr(0) << "transaction_start got " << strerror(errno) << " from btrfs open" << dendl; - if (int err = ::ioctl(fd, BTRFS_IOC_TRANS_START) < 0) { - derr(0) << "transaction_start got " << strerror(err) + if (::ioctl(fd, BTRFS_IOC_TRANS_START) < 0) { + derr(0) << "transaction_start got " << strerror(errno) << " from btrfs ioctl" << dendl; ::close(fd); return -errno; -- 2.39.5