summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/mt/mt.133
-rw-r--r--bin/mt/mt.c7
2 files changed, 29 insertions, 11 deletions
diff --git a/bin/mt/mt.1 b/bin/mt/mt.1
index 26ea4e4e92f..42b1bb8fc63 100644
--- a/bin/mt/mt.1
+++ b/bin/mt/mt.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mt.1,v 1.17 2003/02/26 18:33:18 tedu Exp $
+.\" $OpenBSD: mt.1,v 1.18 2003/03/14 15:00:56 jmc Exp $
.\" $NetBSD: mt.1,v 1.8 1996/05/21 10:23:55 mrg Exp $
.\"
.\" Copyright (c) 1981, 1990, 1993
@@ -43,7 +43,7 @@
.Nd magnetic tape and removable media manipulating program
.Sh SYNOPSIS
.Nm mt
-.Op Fl f Ar tapename
+.Op Fl f Ar device
.Ar command
.Op Ar count
.Nm eject
@@ -60,18 +60,33 @@ Operations may be performed multiple times by specifying
.Ar count .
Note
that
-.Ar tapename
+.Ar device
must reference a raw (not block) tape device.
If
-.Ar tapename
+.Ar device
is of the form
-.Dq host:tapename
+.Dq host:device
or
-.Dq user@host:tapename ,
+.Dq user@host:device ,
.Nm
writes to the named tape device on the remote host using
.Xr rmt 8 .
.Pp
+The options are as follows:
+.Pp
+.Bl -tag -width Ds
+.It Fl f Ar device
+Operate on the
+.Ar device
+specified.
+.El
+.Pp
+If the
+.Fl f
+flag is passed to
+.Nm eject ,
+it is silently ignored.
+.Pp
The available commands are listed below.
Only as many characters as are required to uniquely identify a command
need be specified.
@@ -139,6 +154,10 @@ does not exist,
.Nm
uses the device
.Pa /dev/rst0 .
+The
+.Ev TAPE
+variable is ignored by
+.Nm eject .
.Pp
.Nm
returns a 0 exit status when the operation(s) were successful,
@@ -153,7 +172,7 @@ checks the
.Ev TAPE
environment variable if the
argument
-.Ar tapename
+.Ar device
is not given.
.El
.Sh FILES
diff --git a/bin/mt/mt.c b/bin/mt/mt.c
index ec6cf345a7c..179d6fbd622 100644
--- a/bin/mt/mt.c
+++ b/bin/mt/mt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mt.c,v 1.21 2002/07/04 04:26:40 deraadt Exp $ */
+/* $OpenBSD: mt.c,v 1.22 2003/03/14 15:00:56 jmc Exp $ */
/* $NetBSD: mt.c,v 1.14.2.1 1996/05/27 15:12:11 mrg Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mt.c 8.2 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: mt.c,v 1.21 2002/07/04 04:26:40 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mt.c,v 1.22 2003/03/14 15:00:56 jmc Exp $";
#endif
#endif /* not lint */
@@ -127,10 +127,9 @@ main(int argc, char *argv[])
tape = _PATH_DEFTAPE;
}
- while ((ch = getopt(argc, argv, "f:t:")) != -1) {
+ while ((ch = getopt(argc, argv, "f:")) != -1) {
switch (ch) {
case 'f':
- case 't':
tape = optarg;
break;
default: