remove openbsd-specific timestampin code since ldattach -p is the right
way to do this.
This commit is contained in:
parent
affbcb281c
commit
9c613a8b57
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2008/04/16 06:53:35 ckuethe Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2008/06/13 04:13:36 ckuethe Exp $
|
||||
|
||||
COMMENT-main= service daemon that monitors one or more GPSes
|
||||
COMMENT-motif= motif-based test apps using gpsd
|
||||
@ -7,7 +7,7 @@ COMMENT-python= python bindings for gpsd
|
||||
|
||||
VERSION= 2.37
|
||||
DISTNAME= gpsd-${VERSION}
|
||||
PKGNAME-main= gpsd-${VERSION}p0
|
||||
PKGNAME-main= gpsd-${VERSION}p1
|
||||
PKGNAME-motif= gpsd-motif-${VERSION}
|
||||
PKGNAME-php= gpsd-php-${VERSION}
|
||||
PKGNAME-python= gpsd-python-${VERSION}p0
|
||||
|
50
misc/gpsd/patches/patch-drivers_c
Normal file
50
misc/gpsd/patches/patch-drivers_c
Normal file
@ -0,0 +1,50 @@
|
||||
$OpenBSD: patch-drivers_c,v 1.1 2008/06/13 04:13:36 ckuethe Exp $
|
||||
--- drivers.c.orig Mon Jan 21 11:35:31 2008
|
||||
+++ drivers.c Wed Jun 11 15:14:20 2008
|
||||
@@ -102,46 +102,6 @@ gps_mask_t nmea_parse_input(struct gps_device_t *sessi
|
||||
#endif /* NON_NMEA_ENABLE */
|
||||
gpsd_report(LOG_WARN, "unknown sentence: \"%s\"\n", session->packet.outbuffer);
|
||||
}
|
||||
-#ifdef NMEADISC
|
||||
- if (session->ldisc == 0) {
|
||||
- uid_t old;
|
||||
- int ldisc = NMEADISC;
|
||||
-
|
||||
-#ifdef TIOCSTSTAMP
|
||||
- struct tstamps tstamps;
|
||||
-#ifdef PPS_ON_CTS
|
||||
- tstamps.ts_set |= TIOCM_CTS;
|
||||
-#else /*!PPS_ON_CTS */
|
||||
- tstamps.ts_set |= TIOCM_CAR;
|
||||
-#endif /* PPS_ON_CTS */
|
||||
- tstamps.ts_clr = 0;
|
||||
-
|
||||
- old = geteuid();
|
||||
- if (seteuid(0) == -1)
|
||||
- gpsd_report(LOG_WARN, "can't seteuid(0) - %s", strerror(errno));
|
||||
- else
|
||||
- gpsd_report(LOG_WARN, "seteuid(0) to enable timestamping\n");
|
||||
- if (ioctl(session->gpsdata.gps_fd, TIOCSTSTAMP, &tstamps) < 0)
|
||||
- gpsd_report(LOG_WARN, "can't set kernel timestamping: %s\n",
|
||||
- strerror(errno));
|
||||
- else
|
||||
- gpsd_report(LOG_WARN, "activated kernel timestamping\n");
|
||||
-#endif /* TIOCSTSTAMP */
|
||||
- if (ioctl(session->gpsdata.gps_fd, TIOCSETD, &ldisc) == -1)
|
||||
- gpsd_report(LOG_WARN, "can't set nmea discipline: %s\n",
|
||||
- strerror(errno));
|
||||
- else
|
||||
- gpsd_report(LOG_WARN, "activated nmea discipline\n");
|
||||
- /* this is a flag that shows if we've tried the setup */
|
||||
- session->ldisc = NMEADISC;
|
||||
-
|
||||
- if (old){
|
||||
- gpsd_report(LOG_WARN, "giving up euid 0\n");
|
||||
- (void)seteuid(old);
|
||||
- }
|
||||
- gpsd_report(LOG_WARN, "running with effective user ID %d\n", geteuid());
|
||||
- }
|
||||
-#endif /*NMEADISC */
|
||||
#ifdef NTPSHM_ENABLE
|
||||
/* this magic number is derived from observation */
|
||||
if (session->context->enable_ntpshm &&
|
18
misc/gpsd/patches/patch-gpsd_xml
Normal file
18
misc/gpsd/patches/patch-gpsd_xml
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-gpsd_xml,v 1.1 2008/06/13 04:13:36 ckuethe Exp $
|
||||
--- gpsd.xml.orig Mon Jan 21 11:35:31 2008
|
||||
+++ gpsd.xml Wed Jun 11 15:14:20 2008
|
||||
@@ -780,13 +780,7 @@ of every clock second on the carrier-detect lines of s
|
||||
GPSes; this pulse can be used to update NTP at much higher accuracy
|
||||
than message time provides. You can determine whether your GPS emits
|
||||
this pulse by running at -D 5 and watching for carrier-detect state
|
||||
-change messages in the logfile. On OpenBSD <application>gpsd</application>
|
||||
-makes use of the nmea(4) line discipline and the tty(4) timestamping
|
||||
-facilities to export PPS time via the sensors framework. OpenBSD's ntpd
|
||||
-uses these sensors to adjust the hardware clock and frequency. To make
|
||||
-use of this feature, <application>gpsd</application> must be started
|
||||
-as root so it can activate the timestamping and line discipline; after
|
||||
-attempting to set up PPS, it will relinquish root privileges.</para>
|
||||
+change messages in the logfile.</para>
|
||||
|
||||
<para>When <application>gpsd</application> receives a sentence with a
|
||||
timestamp, it packages the received timestamp with current local time
|
Loading…
Reference in New Issue
Block a user