summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2007-10-13 16:28:25 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2007-10-13 16:28:25 +0000
commit292d8530fe852532afaf84b2694e1fed1323488c (patch)
tree6122cae5c1442411faa90a81f8f01d0b7ce3d514 /sbin
parenta2dccf6b8b407216d5c20f86c4d908936325bdcf (diff)
Unconditionally call the TIOCSTSTAMP ioctl, this way calling nmeaattach(8)
without the '-t' option can be used to turn of tty timestamping. problem noticed by sthen@, ok sthen, deraadt
Diffstat (limited to 'sbin')
-rw-r--r--sbin/nmeaattach/nmeaattach.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/nmeaattach/nmeaattach.c b/sbin/nmeaattach/nmeaattach.c
index bdce15ffbab..eade0e029fa 100644
--- a/sbin/nmeaattach/nmeaattach.c
+++ b/sbin/nmeaattach/nmeaattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nmeaattach.c,v 1.8 2007/04/18 13:50:38 mbalmer Exp $ */
+/* $OpenBSD: nmeaattach.c,v 1.9 2007/10/13 16:28:24 mbalmer Exp $ */
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -141,8 +141,7 @@ main(int argc, char *argv[])
warn("TIOCSDTR");
if (ioctl(fd, TIOCSETD, &nmeadisc) < 0)
err(1, "TIOCSETD");
- if ((tstamps.ts_set || tstamps.ts_clr) &&
- ioctl(fd, TIOCSTSTAMP, &tstamps) < 0)
+ if (ioctl(fd, TIOCSTSTAMP, &tstamps) < 0)
err(1, "TIOCSTSTAMP");
if (!nodaemon && daemon(0, 0))