diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-11-01 19:15:13 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-11-01 19:15:13 +0000 |
commit | 95babe14d50e989dc7e345e5238d048027d9ba29 (patch) | |
tree | 77f407f49cfc1c5258561c0525308a1491dc4862 /garmin.c | |
parent | ba6cb373cb547dae6be27f1aad7867ae5800d915 (diff) | |
download | gpsd-95babe14d50e989dc7e345e5238d048027d9ba29.tar.gz |
Pure refactoring.
Give serial.c a new entry point so storage for TTY settings can stay
private to serial.c rather than being tweaked in the Garmin driver.
Diffstat (limited to 'garmin.c')
-rw-r--r-- | garmin.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -740,17 +740,7 @@ static bool garmin_detect(struct gps_device_t *session) return false; } - /* Save original terminal parameters */ - if (tcgetattr(session->gpsdata.gps_fd,&session->ttyset_old) != 0) { - gpsd_report(0, "garmin_detect: error getting port attributes: %s\n", - strerror(errno)); - return false; - } - memcpy(&session->ttyset,&session->ttyset_old,sizeof(session->ttyset)); - - (void)cfmakeraw(&session->ttyset); - - if (tcsetattr( session->gpsdata.gps_fd, TCIOFLUSH, &session->ttyset) < 0) { + if (!gpsd_set_raw(session)) { gpsd_report(0, "garmin_detect: error changing port attributes: %s\n", strerror(errno)); return false; |