diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-10-13 16:28:25 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-10-13 16:28:25 +0000 |
commit | 292d8530fe852532afaf84b2694e1fed1323488c (patch) | |
tree | 6122cae5c1442411faa90a81f8f01d0b7ce3d514 /sbin | |
parent | a2dccf6b8b407216d5c20f86c4d908936325bdcf (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.c | 5 |
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)) |