diff options
author | michael-west <michael.west@ettus.com> | 2015-08-12 11:29:35 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-08-12 12:02:59 -0700 |
commit | 95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65 (patch) | |
tree | 04ea2c00835e0f167e3f75e9ea3aaa3585485921 /host/lib | |
parent | 6178184c93344381fa5b3b700bc4a4512db8ff2c (diff) | |
download | uhd-95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65.tar.gz uhd-95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65.tar.bz2 uhd-95108f6f6ed6bf44fe38fc9e686fc9c5ae9c0e65.zip |
UHD: Change libusb_error_name() to libusb_strerror() to improve error output
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/libusb1_zero_copy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 <typename buffer_type> @@ -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<buffer_type *>(this), _lut->buffer, (_is_recv)? result.actual_length : _frame_size); |