SCCS-vsn: usr.sbin/rmt/rmt.8 6.3
.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.\" @(#)rmt.8 6.2 (Berkeley) %G%
+.\" @(#)rmt.8 6.3 (Berkeley) %G%
a status indication. All responses are in ASCII and in
one of two forms.
Successful commands have responses of
a status indication. All responses are in ASCII and in
one of two forms.
Successful commands have responses of
-.PP
-.ti +0.5i
-\fBA\fInumber\fR\en
.PP
where
.I number
is an ASCII representation of a decimal number.
Unsuccessful commands are responded to with
.PP
.PP
where
.I number
is an ASCII representation of a decimal number.
Unsuccessful commands are responded to with
.PP
-.ti +0.5i
-\fBE\fIerror-number\fR\en\fIerror-message\fR\en,
+.IP
+.BI E error-number \en error-message \en
.PP
where
.I error-number
.PP
where
.I error-number
from a call to
.IR perror (3).
The protocol is comprised of the
from a call to
.IR perror (3).
The protocol is comprised of the
-following commands (a space is present between each token).
+following commands, which are sent as indicated - no spaces are supplied
+between the command and its arguments, or between its arguments, and
+.B \en
+indicates that a newline should be supplied:
+.BI O device \en mode \en
Open the specified
.I device
using the indicated
Open the specified
.I device
using the indicated
If a device had already been opened, it is
closed before a new open is performed.
.TP 15
If a device had already been opened, it is
closed before a new open is performed.
.TP 15
Close the currently open device. The
.I device
specified is ignored.
.TP 15
Close the currently open device. The
.I device
specified is ignored.
.TP 15
+.BI L whence \en offset \en
Perform an
.IR lseek (2)
operation using the specified parameters.
Perform an
.IR lseek (2)
operation using the specified parameters.
Write data onto the open device.
.I Rmt
reads
Write data onto the open device.
.I Rmt
reads
.IR write (2)
call.
.TP 15
.IR write (2)
call.
.TP 15
Read
.I count
bytes of data from the open device.
Read
.I count
bytes of data from the open device.
then performs the requested
.IR read (2)
and responds with
then performs the requested
.IR read (2)
and responds with
-\fBA\fIcount-read\fR\en if the read was
+.BI A count-read \en
+if the read was
successful; otherwise an error in the
standard format is returned. If the read
was successful, the data read is then sent.
.TP 15
successful; otherwise an error in the
standard format is returned. If the read
was successful, the data read is then sent.
.TP 15
+.BI I operation \en count \en
Perform a MTIOCOP
.IR ioctl (2)
command using the specified parameters.
Perform a MTIOCOP
.IR ioctl (2)
command using the specified parameters.