Subject: Re: Incompatibilities between <=3.0 & current: USB_DEVICEINFO ioctl
To: Stephan Thesing <thesing@cs.uni-sb.de>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 03/20/2006 21:44:47
On Sun, Mar 19, 2006 at 09:21:31PM +0100, Stephan Thesing wrote:
> Hello,
>
> [ sorry if this has been discussed before, a quick search of the mailinglist
> archive didn't give any results... ]
>
> it seems that the binary compatibility between <=3.0 and -current is broken
> w.r.t. the usb(4) USB_DEVICEINFO ioctl.
> In revision 1.72 of sys/dev/usb/usb.h the udi_product, udi_vendor and
> udi_serial members of struct usb_device_info were changed.
> Previously, they were arrays for USB_MAX_STRING_LEN chars, now they are
> arrays for USB_MAX_ENCODED_STRING_LEN (==3*USB_MAX_STRING_LEN) to hold
> encoded UTF8 strings.
>
> I.e. sizeof(struct usb_device_info) changed between <=3.0 and current and
> now a 3.0 binary (e.g. using devel/libusb from pkgsrc) will get EINVAL for
> the ioctl
> USB_DEVICEINFO under -current.
>
> As a struct usb_device_info is part in the union usb_event, this should
> also affect compatibility for the event interface via poll/read.
>
> Is this accepted behavior and I should just live with having to compile a
> libusb under -current (which fixed my problem for digikam) or should a
> compat ioctl be added to -current in order to mimic the old behavior?
> (It will be difficult to mimic the right behavior for reads of events...)
Ideally a compat ioctl should be added, especially as there may be
binary-only statically linked drivers around.
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--