diff options
author | 2008-02-28 11:22:12 +0000 | |
---|---|---|
committer | 2008-02-28 11:22:12 +0000 | |
commit | 11bb8c88a78789877836c818270e378a699bcada (patch) | |
tree | 1a4aa51c6fe18728648ed5433440651b0a4f9b2c | |
parent | from audio(4): (diff) | |
download | wireguard-openbsd-11bb8c88a78789877836c818270e378a699bcada.tar.xz wireguard-openbsd-11bb8c88a78789877836c818270e378a699bcada.zip |
Log an error if a device can not be opened, only log line discipline attachment
when the line discipline has really been attached. And a few manual tweaks.
-rw-r--r-- | sbin/ldattach/ldattach.8 | 8 | ||||
-rw-r--r-- | sbin/ldattach/ldattach.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/sbin/ldattach/ldattach.8 b/sbin/ldattach/ldattach.8 index 00d69a29b28..4b784ed7bf6 100644 --- a/sbin/ldattach/ldattach.8 +++ b/sbin/ldattach/ldattach.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ldattach.8,v 1.9 2008/01/05 17:33:28 mbalmer Exp $ +.\" $OpenBSD: ldattach.8,v 1.10 2008/02/28 11:22:12 mbalmer Exp $ .\" .\" Copyright (c) 2007, 2008 Marc Balmer <mbalmer@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 5 2008 $ +.Dd $Mdocdate: February 28 2008 $ .Dt LDATTACH 8 .Os .Sh NAME @@ -71,7 +71,9 @@ and line disciplines only. Chooses the condition which will cause the current system time to be immediately copied to the terminal timestamp storage for subsequent use by -.Xr nmea 4 . +.Xr nmea 4 +or +.Xr msts 4 . Only one can be used. .Pp .Bl -tag -width DCDXX -offset indent -compact diff --git a/sbin/ldattach/ldattach.c b/sbin/ldattach/ldattach.c index 19667b08ed7..db3549e1a1e 100644 --- a/sbin/ldattach/ldattach.c +++ b/sbin/ldattach/ldattach.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ldattach.c,v 1.4 2008/01/05 17:33:28 mbalmer Exp $ */ +/* $OpenBSD: ldattach.c,v 1.5 2008/02/28 11:22:12 mbalmer Exp $ */ /* * Copyright (c) 2007, 2008 Marc Balmer <mbalmer@openbsd.org> @@ -153,9 +153,10 @@ main(int argc, char *argv[]) goto bail_out; } - syslog(LOG_INFO, "attach %s on %s", disc, dev); - if ((fd = open(dev, O_RDWR)) < 0) + if ((fd = open(dev, O_RDWR)) < 0) { + syslog(LOG_ERR, "can't open %s", dev); goto bail_out; + } /* * Get the current line attributes, modify only values that are @@ -235,6 +236,7 @@ main(int argc, char *argv[]) if (!nodaemon && daemon(0, 0)) errx(1, "can't daemonize"); + syslog(LOG_INFO, "attach %s on %s", disc, dev); signal(SIGHUP, coroner); signal(SIGTERM, coroner); |