summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-03-30 12:31:36 -0700
committerGary E. Miller <gem@rellim.com>2015-03-30 14:25:09 -0700
commit4a4cedd2d5dfe2e85af996b1511fd1ba3a2faf69 (patch)
treef197b75b935999d14faf42a4946424c603704aa2 /ppsthread.c
parent00bddf3b6bf0f376771963e62df0c0d099f0be2e (diff)
downloadgpsd-4a4cedd2d5dfe2e85af996b1511fd1ba3a2faf69.tar.gz
Stringer warning when KPPS not available.
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ppsthread.c b/ppsthread.c
index dcc84bcf..9af4978e 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -184,7 +184,8 @@ static int init_kernel_pps(volatile struct pps_thread_t *pps_thread)
* This next code block abuses "ret" by storing the filedescriptor
* to use for RFC2783 calls.
*/
- ret = -1;
+ ret = -1; /* this ret will not be unneeded when the 'else' part
+ * of the followinng ifdef becomes an #elif */
#ifdef __linux__
/*
* Some Linuxes, like the RasbPi's, have PPS devices preexisting.
@@ -1117,11 +1118,17 @@ void pps_thread_activate(volatile struct pps_thread_t *pps_thread)
/* some operations in init_kernel_pps() require root privs */
(void)init_kernel_pps(pps_thread);
if ( 0 <= pps_thread->kernelpps_handle ) {
- pps_thread->log_hook(pps_thread, THREAD_WARN,
+ pps_thread->log_hook(pps_thread, THREAD_INFO,
"KPPS:%s kernel PPS will be used\n",
pps_thread->devicename);
- }
+ } else
#endif
+ {
+ pps_thread->log_hook(pps_thread, THREAD_WARN,
+ "KPPS:%s kernel PPS unavailable, PPS accuracy will suffer\n",
+ pps_thread->devicename);
+ }
+
memset( &pt, 0, sizeof(pt));
/*@i1@*/retval = pthread_create(&pt, NULL, gpsd_ppsmonitor, (void *)pps_thread);
pps_thread->log_hook(pps_thread, THREAD_PROG, "PPS:%s thread %s\n",