diff options
author | Paul Fertser <fercerpav@gmail.com> | 2013-05-31 14:57:56 +0400 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-06-12 14:40:16 +0000 |
commit | 71ee5f6b5f3172901135640de4ca827b14747465 (patch) | |
tree | 6c7ce79d61ecbeb613c5ff78281238ed1006dcb0 /src/jtag/drivers/mpsse.c | |
parent | 703781c5abaa7e3a93e56e179c2eb4fca53b7550 (diff) | |
download | riscv-openocd-71ee5f6b5f3172901135640de4ca827b14747465.zip riscv-openocd-71ee5f6b5f3172901135640de4ca827b14747465.tar.gz riscv-openocd-71ee5f6b5f3172901135640de4ca827b14747465.tar.bz2 |
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.
Also output a configure warning if libusb older than 1.0.9 is detected.
Change-Id: I800f71f06672fe06c0a98a4e469f853b5021bcfe
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1430
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/jtag/drivers/mpsse.c')
-rw-r--r-- | src/jtag/drivers/mpsse.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c index 13f61d7..82703bf 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; } |