From 95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65 Mon Sep 17 00:00:00 2001 From: michael-west Date: Wed, 12 Aug 2015 11:29:35 -0700 Subject: UHD: Change libusb_error_name() to libusb_strerror() to improve error output --- host/lib/transport/libusb1_zero_copy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp index b67b36d0a..b6e7d869a 100644 --- a/host/lib/transport/libusb1_zero_copy.cpp +++ b/host/lib/transport/libusb1_zero_copy.cpp @@ -140,7 +140,7 @@ public: const int ret = libusb_submit_transfer(_lut); if (ret != LIBUSB_SUCCESS) throw uhd::usb_error(ret, str(boost::format( - "usb %s submit failed: %s") % _name % libusb_error_name(ret))); + "usb %s submit failed: %s") % _name % libusb_strerror((libusb_error)ret))); } template @@ -149,7 +149,7 @@ public: if (wait_for_completion(timeout)) { if (result.status != LIBUSB_TRANSFER_COMPLETED) - throw uhd::runtime_error(str(boost::format("usb %s transfer status: %d") + throw uhd::usb_error(result.status, str(boost::format("usb %s transfer status: %s") % _name % libusb_error_name(result.status))); result.completed = 0; return make(reinterpret_cast(this), _lut->buffer, (_is_recv)? result.actual_length : _frame_size); -- cgit v1.2.3