[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is just a wrong function name of libusb_get_port_number? request for
From: |
kraxel |
Subject: |
Re: is just a wrong function name of libusb_get_port_number? request for a review of the bug fix(Internet mail) |
Date: |
Fri, 3 Apr 2020 10:19:02 +0200 |
On Fri, Apr 03, 2020 at 07:05:13AM +0000, bauerchen(陈蒙蒙) wrote:
> thanks, but my libusbx version is libusbx-1.0.15-4.el7.x86_64 ,
> I can find libusb_get_port_numbers function in libusb-1.0.so.0 but find
> libusb_get_port_number
>
> [root@t]# strings /lib64/libusb-1.0.so.0 |grep libusb_get_port_number
> libusb_get_port_number
> [root@t]#
kraxel@sirius ~# grep libusb_get_port_number /usr/include/libusb-1.0/libusb.h
uint8_t LIBUSB_CALL libusb_get_port_number(libusb_device *dev);
int LIBUSB_CALL libusb_get_port_numbers(libusb_device *dev, uint8_t*
port_numbers, int port_numbers_len);
LIBUSB_DEPRECATED_FOR(libusb_get_port_numbers)
So libusb_get_port_numbers replaces libusb_get_port_number, seems you have an
old version which hasn't yet libusb_get_port_numbers.
On old version qemu should fallback to libusb_get_port_path, but maybe the
version #ifdef is wrong so this doesn't work properly for some versions ...
According to my /usr/include/libusb-1.0/libusb.h libusb >= 1.0.16 declares
LIBUSB_API_VERSION >= 0x01000102, so that looks ok. Hmm, not sure what is
going on here. In any case the libusb_get_port_path fallback code path
should work.
cheers,
Gerd