qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* is just a wrong function name of libusb_get_port_number? request for a review of the bug fix
@ 2020-04-02 11:47 bauerchen(陈蒙蒙)
  2020-04-03  6:50 ` kraxel
  0 siblings, 1 reply; 5+ messages in thread
From: bauerchen(陈蒙蒙) @ 2020-04-02 11:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: hdegoede, kraxel

From 6bfb3087866606ed36a21e7bd05f0674e6a97158 Mon Sep 17 00:00:00 2001
From: Bauerchen <bauerchen@tencent.com>
Date: Thu, 2 Apr 2020 19:19:00 +0800
Subject: [PATCH] Fix:fix the wrong function name of libusb_get_port_number

[desc]:
libusb_get_port_numbers is called in function
usb_host_get_port, and qemu crashed with:
symbol lookup error: undefined symbol: libusb_get_port_numbers
I check /lib64/libusb-1.0.so.0 and output is libusb_get_port_number, I
change it to libusb_get_port_number, crash problem is gone;
so is it just a function name bug?

Signed-off-by: Bauerchen <bauerchen@tencent.com>
---
 hw/usb/host-libusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index 2ac7a93..713db8d 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -285,7 +285,7 @@ static int usb_host_get_port(libusb_device *dev, char *port, size_t len)
     int rc, i;
 
 #if LIBUSB_API_VERSION >= 0x01000102
-    rc = libusb_get_port_numbers(dev, path, 7);
+    rc = libusb_get_port_number(dev, path, 7);
 #else
     rc = libusb_get_port_path(ctx, dev, path, 7);
 #endif
-- 
1.8.3.1


-------------
bauerchen

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-03  9:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 11:47 is just a wrong function name of libusb_get_port_number? request for a review of the bug fix bauerchen(陈蒙蒙)
2020-04-03  6:50 ` kraxel
2020-04-03  7:05   ` Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix(Internet mail) bauerchen(陈蒙蒙)
2020-04-03  8:19     ` kraxel
2020-04-03  8:50       ` bauerchen(陈蒙蒙)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).