summaryrefslogtreecommitdiff
path: root/timehint.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2016-05-10 22:30:45 -0400
committerEric S. Raymond <esr@thyrsus.com>2016-05-10 22:30:45 -0400
commitb8ccd67ca2213b421a2ef3acd6d759e79ef993d1 (patch)
tree6d515f9a339c7a2b61f61395df829b777bca9eed /timehint.c
parentcd03726356114acf3a03c103bd790d4132d8d690 (diff)
downloadgpsd-b8ccd67ca2213b421a2ef3acd6d759e79ef993d1.tar.gz
Im[p;ement and document /dev/gpsd0 side effect.
Diffstat (limited to 'timehint.c')
-rw-r--r--timehint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/timehint.c b/timehint.c
index 8ac3fad8..4444df1c 100644
--- a/timehint.c
+++ b/timehint.c
@@ -448,8 +448,9 @@ void ntpshm_link_activate(struct gps_device_t *session)
* there is a static /dev/pps0, and we have access because
* we're root, assume we want to use KPPS.
*/
- if (strcmp(session->pps_thread.devicename, MAGIC_HAT_GPS) == 0
- && access("/dev/pps0", R_OK | W_OK) == 0)
+ if ((strcmp(session->pps_thread.devicename, MAGIC_HAT_GPS) == 0
+ || strcmp(session->pps_thread.devicename, MAGIC_HAT_GPS) == 0)
+ && access("/dev/pps0", R_OK | W_OK) == 0)
session->pps_thread.devicename = "/dev/pps0";
pps_thread_activate(&session->pps_thread);
}