fixed build with TRUNK
fixed memleak git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12857 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
EXTRA_LTLIBRARIES += usbscsi.la
|
||||
|
||||
|
||||
usbdiskdirect_la_LDFLAGS = -module -no-undefined -avoid-version \
|
||||
usbscsi_la_LDFLAGS = -module -no-undefined -avoid-version \
|
||||
-export-dynamic \
|
||||
-export-symbols $(top_srcdir)/iolib.sym
|
||||
usbdiskdirect_la_CPPFLAGS = $(AM_CPPFLAGS) $(INTL_CFLAGS) $(CPPFLAGS)
|
||||
usbdiskdirect_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
|
||||
usbdiskdirect_la_LIBADD = \
|
||||
usbscsi_la_CPPFLAGS = $(AM_CPPFLAGS) $(INTL_CFLAGS) $(CPPFLAGS)
|
||||
usbscsi_la_DEPENDENCIES = $(top_srcdir)/iolib.sym
|
||||
usbscsi_la_LIBADD = \
|
||||
$(top_builddir)/libgphoto2_port/libgphoto2_port.la \
|
||||
$(SERIAL_LIBS) \
|
||||
$(INTLLIBS)
|
||||
usbdiskdirect_la_SOURCES = usbscsi/linux.c
|
||||
usbscsi_la_SOURCES = usbscsi/linux.c
|
||||
|
||||
@@ -202,19 +202,21 @@ gp_port_library_list (GPPortInfoList *list)
|
||||
return GP_OK;
|
||||
|
||||
while ((dirent = readdir (dir))) {
|
||||
char path[4096];
|
||||
if (gp_port_usbscsi_get_usb_id (dirent->d_name,
|
||||
&vendor_id, &product_id) != GP_OK)
|
||||
continue; /* Not a usb device */
|
||||
|
||||
info.type = GP_PORT_USB_SCSI;
|
||||
snprintf (info.path, sizeof (info.path),
|
||||
gp_port_info_new (&info);
|
||||
gp_port_info_set_type (info, GP_PORT_USB_SCSI);
|
||||
snprintf (path, sizeof (path),
|
||||
"usbscsi:/dev/%s",
|
||||
dirent->d_name);
|
||||
snprintf (info.name, sizeof (info.name),
|
||||
_("USB Mass Storage raw SCSI"));
|
||||
gp_port_info_set_path (info, path);
|
||||
gp_port_info_set_name (info, _("USB Mass Storage raw SCSI"));
|
||||
CHECK (gp_port_info_list_append (list, info))
|
||||
}
|
||||
|
||||
closedir (dir);
|
||||
return GP_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user