diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 17:40:48 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 17:40:48 -0400 |
commit | d77d96c6d6150ffe24f1d57fd021d18f0c20901b (patch) | |
tree | 3f2c30d539431d552e9c9132c29f5304ad413420 /driver_garmin.c | |
parent | 0a113e2f39e179e84b03e1da1947f401966d981e (diff) | |
download | gpsd-d77d96c6d6150ffe24f1d57fd021d18f0c20901b.tar.gz |
All gpsd_reportcalls are gone. Only the unused definitins are left.
Next, implement labeled reporting and fix up gpson to do the right thing.
All regression tests pass.
Diffstat (limited to 'driver_garmin.c')
-rw-r--r-- | driver_garmin.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/driver_garmin.c b/driver_garmin.c index 27200b49..c32bf82b 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -847,7 +847,7 @@ static void Build_Send_SER_Packet(struct gps_device_t *session, // This works around cppcheck not looking into enough config branches // cppcheck-suppress unusedFunction static bool is_usb_device(const char *path UNUSED, int vendor, int product, - const int debug) + struct errout_t *errout) { // discover devices libusb_device **list; @@ -855,12 +855,12 @@ static bool is_usb_device(const char *path UNUSED, int vendor, int product, ssize_t i = 0; bool found = false; - gpsd_report(debug, LOG_INF, + gpsd_notify(errout, LOG_INF, "attempting USB device enumeration.\n"); (void)libusb_init(NULL); if ((cnt = libusb_get_device_list(NULL, &list)) < 0) { - gpsd_report(debug, LOG_ERROR, + gpsd_notify(errout, LOG_ERROR, "USB device list call failed.\n"); libusb_exit(NULL); return false; @@ -872,13 +872,13 @@ static bool is_usb_device(const char *path UNUSED, int vendor, int product, int r = libusb_get_device_descriptor(dev, &desc); if (r < 0) { - gpsd_report(debug, LOG_ERROR, + gpsd_notify(errout, LOG_ERROR, "USB descriptor fetch failed on device %zd.\n", i); continue; } /* we can extract device descriptor data */ - gpsd_report(debug, LOG_INF, + gpsd_notify(errout, LOG_INF, "%04x:%04x (bus %d, device %d)\n", desc.idVendor, desc.idProduct, libusb_get_bus_number(dev), @@ -891,7 +891,7 @@ static bool is_usb_device(const char *path UNUSED, int vendor, int product, } } - gpsd_report(debug, LOG_INF, + gpsd_notify(errout, LOG_INF, "vendor/product match with %04x:%04x %sfound\n", vendor, product, found ? "" : "not "); libusb_free_device_list(list, 1); @@ -941,7 +941,7 @@ static bool garmin_usb_detect(struct gps_device_t *session UNUSED) else { #ifdef HAVE_LIBUSB if (!is_usb_device(session->gpsdata.dev.path, 0x091e, 0x0003, - session->context->errout.debug)) + &session->context->errout)) return false; if (!gpsd_set_raw(session)) { |