diff options
-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); |