Merge pull request #14223 from tchaikov/wip-rbd-nbd-ftbfs

rbd-nbd: s/cpp_error/cpp_strerror/ to fix FTBFS

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Pan Liu <liupan1111@gmail.com>
This commit is contained in:
Kefu Chai 2017-03-29 21:21:24 +08:00 committed by GitHub
commit 06256a53f3

View File

@ -26,7 +26,6 @@
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <assert.h>
#include <linux/nbd.h>
#include <linux/fs.h>
@ -98,7 +97,7 @@ static void handle_signal(int signum)
derr << "*** Got signal " << sig_str(signum) << " ***" << dendl;
dout(20) << __func__ << ": " << "sending NBD_DISCONNECT" << dendl;
if (ioctl(nbd, NBD_DISCONNECT) < 0) {
derr << "rbd-nbd: disconnect failed: " << cpp_error(errno) << std::endl;
derr << "rbd-nbd: disconnect failed: " << cpp_strerror(errno) << dendl;
} else {
dout(20) << __func__ << ": " << "disconnected" << dendl;
}