summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2008-02-28 11:22:13 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2008-02-28 11:22:13 +0000
commit595436a6582e11d40fa1bc60ae1d9327d1f16ede (patch)
tree216a78b227b7860fc395e9113e45875341240404 /sbin
parenta83361e59eca6b9ecbbfacb0af2f1371153d239a (diff)
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.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ldattach/ldattach.88
-rw-r--r--sbin/ldattach/ldattach.c8
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);