diff options
author | Harald Welte <laforge@osmocom.org> | 2022-01-31 18:39:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-01-31 18:40:03 +0100 |
commit | e452dd053ec044bceb2933f189ed34bc1278b3aa (patch) | |
tree | aa4d13d85ec04f8da0c483c9e699e6312cf65766 | |
parent | a366a895976ffc17c632781f0c9e33a590ed94a7 (diff) |
osmo_libusb: Print log message on libusb initialization error
Change-Id: I2ac56e378e1279e7e333d93e54cd7a182d76498d
-rw-r--r-- | src/usb/osmo_libusb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c index 79a8fc3b..c5ea5079 100644 --- a/src/usb/osmo_libusb.c +++ b/src/usb/osmo_libusb.c @@ -740,8 +740,10 @@ int osmo_libusb_init(libusb_context **pluctx) int rc; rc = libusb_init(pluctx); - if (rc != 0) + if (rc != 0) { + LOGP(DLUSB, LOGL_ERROR, "Error initializing libusb: %s\n", libusb_strerror(rc)); return rc; + } if (pluctx) luctx = *pluctx; |