summaryrefslogtreecommitdiff
path: root/driver_superstar2.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-06-17 02:23:58 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-06-17 02:23:58 -0400
commit0d3f1eb114c9733519a25f8881b85cb81a7d37a0 (patch)
treeca41b5e9e9ca78637795fbfa5d27b0991dde588d /driver_superstar2.c
parent730b2feea3b2da3d046b25b119375682dea5e179 (diff)
downloadgpsd-0d3f1eb114c9733519a25f8881b85cb81a7d37a0.tar.gz
Cut down on gpsd_hexdump_wrapper() calls.
This awkward construct seems to have triggered some sort of toolchain bug. The symptom is that gpsd_hexdump_level has different values depending on whether we test it inside or outside of hex.c. As a first step towards eliminating this global, we throw out a bunch of hex logging that is duplicative or not really needed for production drivers. Experimental drivers can call the hex dumper unconditionally. The goal is to reduce the number of uses of this variable to eliminate it withoud doing violence to the internal APIs. This is a first step. All regression tests pass.
Diffstat (limited to 'driver_superstar2.c')
-rw-r--r--driver_superstar2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/driver_superstar2.c b/driver_superstar2.c
index c3704f07..d7fa099b 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -370,9 +370,8 @@ superstar2_write(struct gps_device_t *session, char *msg, size_t msglen)
c += 0x100;
msg[(int)msg[3] + 4] = (char)((c >> 8) & 0xff);
msg[(int)msg[3] + 5] = (char)(c & 0xff);
- gpsd_report(LOG_IO, "writing superstar2 control type %d len %zu:%s\n",
- (int)msg[1] & 0x7f, msglen,
- gpsd_hexdump_wrapper(msg, msglen, LOG_IO));
+ gpsd_report(LOG_IO, "writing superstar2 control type %d len %zu\n",
+ (int)msg[1] & 0x7f, msglen);
return gpsd_write(session, msg, msglen);
}
@@ -415,8 +414,8 @@ superstar2_dispatch(struct gps_device_t * session, unsigned char *buf,
default:
gpsd_report(LOG_WARN,
- "unknown superstar2 packet id 0x%02x length %zd: %s\n",
- type, len, gpsd_hexdump_wrapper(buf, len, LOG_WARN));
+ "unknown superstar2 packet id 0x%02x length %zd\n",
+ type, len);
return 0;
}
}