This is an automated email from Gerrit. Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1430
-- gerrit commit 6bd02aed27d2ffe8bbd9e35f0795109708a4388d Author: Paul Fertser <[email protected]> Date: Fri May 31 14:57:56 2013 +0400 libusb1_common, ftdi: clarify libusb_open error message Print a user-friendly message when libusb_open() fails, e.g. Error: libusb_open() failed with LIBUSB_ERROR_ACCESS when there's a permissions problem. Change-Id: I800f71f06672fe06c0a98a4e469f853b5021bcfe Signed-off-by: Paul Fertser <[email protected]> diff --git a/src/jtag/drivers/libusb1_common.c b/src/jtag/drivers/libusb1_common.c index 888420a..5ccc57b 100644 --- a/src/jtag/drivers/libusb1_common.c +++ b/src/jtag/drivers/libusb1_common.c @@ -62,8 +62,11 @@ int jtag_libusb_open(const uint16_t vids[], const uint16_t pids[], /** Free the device list **/ libusb_free_device_list(devs, 1); - if (errCode < 0) + if (errCode) { + LOG_ERROR("libusb_open() failed with %s", + libusb_error_name(errCode)); return errCode; + } return 0; } return -ENODEV; diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c index 4142969..997b1b4 100644 --- a/src/jtag/drivers/mpsse.c +++ b/src/jtag/drivers/mpsse.c @@ -135,7 +135,8 @@ static bool open_matching_device(struct mpsse_ctx *ctx, const uint16_t *vid, con err = libusb_open(device, &ctx->usb_dev); if (err != LIBUSB_SUCCESS) { - LOG_ERROR("libusb_open() failed with %d", err); + LOG_ERROR("libusb_open() failed with %s", + libusb_error_name(err)); continue; } -- ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
