From 7d2b842645114a396db20534aade48cfeeb583b2 Mon Sep 17 00:00:00 2001 From: Scott Fritzinger Date: Wed, 24 Jan 2001 21:33:27 +0000 Subject: [PATCH] made the usb port lib follow global debug git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@1549 67ed7778-7388-44ab-90cf-0a291f65f57c --- libgphoto2_port/usb/libusb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libgphoto2_port/usb/libusb.c b/libgphoto2_port/usb/libusb.c index 78c05f7b6..fd1508edf 100644 --- a/libgphoto2_port/usb/libusb.c +++ b/libgphoto2_port/usb/libusb.c @@ -32,7 +32,6 @@ #include #include "gphoto2-port.h" -#define GP_PORT_USB_DEBUG 1 int gp_port_usb_list(gp_port_info *list, int *count); int gp_port_usb_init(gp_port *dev); @@ -109,7 +108,7 @@ int gp_port_usb_open(gp_port *dev) int ret; void *udev; - if (GP_PORT_USB_DEBUG) + if (dev->debug_level) printf ("gp_port_usb_open() called\n"); /* Open the device using the previous usb_handle returned by find_device */ @@ -145,7 +144,7 @@ int gp_port_usb_open(gp_port *dev) int gp_port_usb_close(gp_port *dev) { - if (GP_PORT_USB_DEBUG) + if (dev->debug_level) printf ("gp_port_usb_close() called\n"); if (usb_close(dev->device_handle) < 0) @@ -184,7 +183,7 @@ int gp_port_usb_clear_halt_lib(gp_port * dev, int ep) int gp_port_usb_write(gp_port * dev, char *bytes, int size) { int ret; - if (GP_PORT_USB_DEBUG) { + if (dev->debug_level) { int i; printf("gp_port_usb_write(): "); @@ -209,7 +208,7 @@ int gp_port_usb_read(gp_port * dev, char *bytes, int size) if (ret < 0) return GP_ERROR_IO_READ; - if (GP_PORT_USB_DEBUG) { + if (dev->debug_level) { int i; printf("gp_port_usb_read(timeout=%d): ", dev->timeout);