From 292d8530fe852532afaf84b2694e1fed1323488c Mon Sep 17 00:00:00 2001 From: Marc Balmer Date: Sat, 13 Oct 2007 16:28:25 +0000 Subject: 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 --- sbin/nmeaattach/nmeaattach.c | 5 ++--- 1 file 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)) -- cgit v1.2.3