From: Bert Vermeulen Date: Sun, 5 Jun 2011 00:08:08 +0000 (+0200) Subject: saleae-logic: use new logging system X-Git-Tag: libsigrok-0.1.0~247 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e53c830f33d08633db4eb560f08d2518ff26ad9e;p=libsigrok.git saleae-logic: use new logging system --- diff --git a/hardware/saleae-logic/saleae-logic.c b/hardware/saleae-logic/saleae-logic.c index de33f23a..6c039d4e 100644 --- a/hardware/saleae-logic/saleae-logic.c +++ b/hardware/saleae-logic/saleae-logic.c @@ -199,7 +199,7 @@ static struct sr_device_instance *sl_open_device(int device_index) libusb_get_device_list(usb_context, &devlist); for (i = 0; devlist[i]; i++) { if ((err = libusb_get_device_descriptor(devlist[i], &des))) { - g_warning("failed to get device descriptor: %d", err); + sr_warn("failed to get device descriptor: %d", err); continue; } @@ -232,11 +232,11 @@ static struct sr_device_instance *sl_open_device(int device_index) sdi->usb->address = libusb_get_device_address(devlist[i]); sdi->status = SR_ST_ACTIVE; - g_message("saleae: opened device %d on %d.%d interface %d", + sr_info("saleae: opened device %d on %d.%d interface %d", sdi->index, sdi->usb->bus, sdi->usb->address, USB_INTERFACE); } else { - g_warning("failed to open device: %d", err); + sr_warn("failed to open device: %d", err); sdi = NULL; } } @@ -409,7 +409,7 @@ static int hw_opendev(int device_index) */ sdi = NULL; if (fw_updated.tv_sec > 0) { - g_message("saleae: waiting for device to reset"); + sr_info("saleae: waiting for device to reset"); /* takes at least 300ms for the FX2 to be gone from the USB bus */ g_usleep(300*1000); timediff = 0; @@ -420,7 +420,7 @@ static int hw_opendev(int device_index) g_get_current_time(&cur_time); timediff = GTV_TO_MSEC(cur_time) - GTV_TO_MSEC(fw_updated); } - g_message("saleae: device came back after %d ms", timediff); + sr_info("saleae: device came back after %d ms", timediff); } else { sdi = sl_open_device(device_index); }