Re: [Libusbx-devel] [libusb-compat PATCH] Link with -znodelete to disallow unloading

2013-08-16 Thread Xiaofan Chen
On Fri, Aug 16, 2013 at 4:51 PM, Hans de Goede wrote: > On 08/16/2013 05:34 AM, Xiaofan Chen wrote: >>> diff --git a/libusb/Makefile.am b/libusb/Makefile.am >>> index 33a609a..a20fdb5 100644 >>> --- a/libusb/Makefile.am >>> +++ b/libusb/Makefile.am >>> @@ -5,5 +5,5 @@ libusb_la_SOURCES = core.c us

Re: [Libusbx-devel] [libusb-compat PATCH] Link with -znodelete to disallow unloading

2013-08-16 Thread Hans de Goede
Hi, On 08/16/2013 05:34 AM, Xiaofan Chen wrote: > On Wed, Aug 14, 2013 at 10:05 PM, Hans de Goede wrote: >> From: Daniel Berrange >> >> Since libusb-0.1 did not have any init / exit function, code using the >> libusb-0.1 API will not call libusb_exit. > > Hmm, it that true with the latest libusb

Re: [Libusbx-devel] [libusb-compat PATCH] Link with -znodelete to disallow unloading

2013-08-15 Thread Xiaofan Chen
On Wed, Aug 14, 2013 at 10:05 PM, Hans de Goede wrote: > From: Daniel Berrange > > Since libusb-0.1 did not have any init / exit function, code using the > libusb-0.1 API will not call libusb_exit. Hmm, it that true with the latest libusb-compat-0.1.5? As per the ticket #130 for libusb-compat-0.

Re: [Libusbx-devel] [libusb-compat PATCH] Link with -znodelete to disallow unloading

2013-08-14 Thread Daniel P. Berrange
On Wed, Aug 14, 2013 at 04:05:48PM +0200, Hans de Goede wrote: > From: Daniel Berrange > > Since libusb-0.1 did not have any init / exit function, code using the > libusb-0.1 API will not call libusb_exit. > > Now, libgphoto uses libusb and will dlopen() and dlclose() it. Unfortunately > since t

[Libusbx-devel] [libusb-compat PATCH] Link with -znodelete to disallow unloading

2013-08-14 Thread Hans de Goede
From: Daniel Berrange Since libusb-0.1 did not have any init / exit function, code using the libusb-0.1 API will not call libusb_exit. Now, libgphoto uses libusb and will dlopen() and dlclose() it. Unfortunately since there is no way to ensure libusb_close() is called, when libgphoto dlcloses th