diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-11-20 16:04:21 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-11-20 16:04:21 +0000 |
commit | 3fabf69fa8390c436d18f4af42afeca74cce104f (patch) | |
tree | 88a31c6fefc6b01d55bcf75a391ca788c0d1ba38 /gpsd.c | |
parent | 25fefbe9dcbb3a03e9f2000746f18c660983feed (diff) | |
download | gpsd-3fabf69fa8390c436d18f4af42afeca74cce104f.tar.gz |
No need to configure the device if all we're doing is checking accessibility.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -493,10 +493,15 @@ static /*@null@*/ struct gps_device_t *open_device(char *device_name) found: gpsd_init(chp, &context, device_name); chp->gpsdata.raw_hook = raw_hook; - if (gpsd_activate(chp) < 0) { + /* + * This used to be a device_activate() call. But we're only checking + * accessibility here -- we don't need full device activation, and + * in particular we don't need to configure the device. + */ + if (gpsd_open(chp) < 0) { return NULL; } - gpsd_report(LOG_PROG, "flagging descriptor %d in open_device\n", chp->gpsdata.gps_fd); + gpsd_report(LOG_RAW, "flagging descriptor %d in open_device\n", chp->gpsdata.gps_fd); FD_SET(chp->gpsdata.gps_fd, &all_fds); adjust_max_fd(chp->gpsdata.gps_fd, true); return chp; |