summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/mtio.4139
-rw-r--r--share/man/man4/sa.416
-rw-r--r--share/mk/bsd.libnames.mk1
3 files changed, 133 insertions, 23 deletions
diff --git a/share/man/man4/mtio.4 b/share/man/man4/mtio.4
index e8056e6..58a4a82 100644
--- a/share/man/man4/mtio.4
+++ b/share/man/man4/mtio.4
@@ -35,7 +35,7 @@
.\" @(#)mtio.4 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd November 11, 2011
+.Dd February 12, 2015
.Dt MTIO 4
.Os
.Sh NAME
@@ -44,10 +44,10 @@
.Sh DESCRIPTION
The special files
named
-.Pa /dev/[n]sa*
+.Pa /dev/[en]sa*
refer to SCSI tape drives,
which may be attached to the system.
-.Pa /dev/[n]sa*.ctl
+.Pa /dev/sa*.ctl
are control devices that can be used to issue ioctls to the SCSI
tape driver to set parameters that are required to last beyond the
unmounting of a tape.
@@ -57,16 +57,19 @@ when the last requested read, write or seek has finished, or the end of the tape
has been reached.
The letter
.Ql n
-is usually prepended to
+is prepended to
the name of the no-rewind devices.
+The letter
+.Ql e
+is prepended to the name of the eject devices.
.Pp
Tapes can be written with either fixed length records or variable length
records.
See
.Xr sa 4
for more information.
-Two end-of-file markers mark the end of a tape, and
-one end-of-file marker marks the end of a tape file.
+Two filemarks mark the end of a tape, and
+one filemark marks the end of a tape file.
If the tape is not to be rewound it is positioned with the
head in between the two tape marks, where the next write
will over write the second end-of-file marker.
@@ -132,6 +135,8 @@ struct mtop {
#define MTWSS 16 /* write setmark(s) */
#define MTFSS 17 /* forward space setmark */
#define MTBSS 18 /* backward space setmark */
+#define MTLOAD 19 /* load tape in drive */
+#define MTWEOFI 20 /* write an end-of-file record without waiting*/
#define MT_COMP_ENABLE 0xffffffff
#define MT_COMP_DISABLED 0xfffffffe
@@ -228,6 +233,112 @@ union mterrstat {
char _reserved_padding[256];
};
+struct mtrblim {
+ uint32_t granularity;
+ uint32_t min_block_length;
+ uint32_t max_block_length;
+};
+
+typedef enum {
+ MT_LOCATE_DEST_OBJECT = 0x00,
+ MT_LOCATE_DEST_FILE = 0x01,
+ MT_LOCATE_DEST_SET = 0x02,
+ MT_LOCATE_DEST_EOD = 0x03
+} mt_locate_dest_type;
+
+typedef enum {
+ MT_LOCATE_BAM_IMPLICIT = 0x00,
+ MT_LOCATE_BAM_EXPLICIT = 0x01
+} mt_locate_bam;
+
+typedef enum {
+ MT_LOCATE_FLAG_IMMED = 0x01,
+ MT_LOCATE_FLAG_CHANGE_PART = 0x02
+} mt_locate_flags;
+
+struct mtlocate {
+ mt_locate_flags flags;
+ mt_locate_dest_type dest_type;
+ mt_locate_bam block_address_mode;
+ int64_t partition;
+ uint64_t logical_id;
+ uint8_t reserved[64];
+};
+
+typedef enum {
+ MT_EXT_GET_NONE,
+ MT_EXT_GET_OK,
+ MT_EXT_GET_NEED_MORE_SPACE,
+ MT_EXT_GET_ERROR
+} mt_ext_get_status;
+
+struct mtextget {
+ uint32_t alloc_len;
+ char *status_xml;
+ uint32_t fill_len;
+ mt_ext_get_status status;
+ char error_str[128];
+ uint8_t reserved[64];
+};
+
+#define MT_EXT_GET_ROOT_NAME "mtextget"
+#define MT_DENSITY_ROOT_NAME "mtdensity"
+#define MT_MEDIA_DENSITY_NAME "media_density"
+#define MT_DENSITY_REPORT_NAME "density_report"
+#define MT_MEDIUM_TYPE_REPORT_NAME "medium_type_report"
+#define MT_MEDIA_REPORT_NAME "media_report"
+#define MT_DENSITY_ENTRY_NAME "density_entry"
+
+#define MT_DENS_WRITE_OK 0x80
+#define MT_DENS_DUP 0x40
+#define MT_DENS_DEFLT 0x20
+
+
+#define MT_PARAM_FIXED_STR_LEN 32
+union mt_param_value {
+ int64_t value_signed;
+ uint64_t value_unsigned;
+ char *value_var_str;
+ char value_fixed_str[MT_PARAM_FIXED_STR_LEN];
+ uint8_t reserved[64];
+};
+
+typedef enum {
+ MT_PARAM_SET_NONE,
+ MT_PARAM_SET_SIGNED,
+ MT_PARAM_SET_UNSIGNED,
+ MT_PARAM_SET_VAR_STR,
+ MT_PARAM_SET_FIXED_STR
+} mt_param_set_type;
+
+typedef enum {
+ MT_PARAM_STATUS_NONE,
+ MT_PARAM_STATUS_OK,
+ MT_PARAM_STATUS_ERROR
+} mt_param_set_status;
+
+#define MT_PARAM_VALUE_NAME_LEN 64
+struct mtparamset {
+ char value_name[MT_PARAM_VALUE_NAME_LEN];
+ mt_param_set_type value_type;
+ int value_len;
+ union mt_param_value value;
+ mt_param_set_status status;
+ char error_str[128];
+};
+
+#define MT_PARAM_ROOT_NAME "mtparamget"
+#define MT_PROTECTION_NAME "protection"
+
+/*
+ * Set a list of parameters.
+ */
+struct mtsetlist {
+ int num_params;
+ int param_len;
+ struct mtparamset *params;
+};
+
/*
* Constants for mt_type byte. These are the same
* for controllers compatible with the types listed.
@@ -277,6 +388,12 @@ union mterrstat {
#define MTIOCSETEOTMODEL _IOW('m', 8, uint32_t)
/* Get current EOT model */
#define MTIOCGETEOTMODEL _IOR('m', 8, uint32_t)
+#define MTIOCRBLIM _IOR('m', 9, struct mtrblim) /* get block limits */
+#define MTIOCEXTLOCATE _IOW('m', 10, struct mtlocate) /* seek to position */
+#define MTIOCEXTGET _IOWR('m', 11, struct mtextget) /* get tape status */
+#define MTIOCPARAMGET _IOWR('m', 12, struct mtextget) /* get tape params */
+#define MTIOCPARAMSET _IOWR('m', 13, struct mtparamset) /* set tape params */
+#define MTIOCSETLIST _IOWR('m', 14, struct mtsetlist) /* set N params */
#ifndef _KERNEL
#define DEFTAPE "/dev/nsa0"
@@ -285,13 +402,12 @@ union mterrstat {
#endif /* !_SYS_MTIO_H_ */
.Ed
.Sh FILES
-.Bl -tag -width /dev/[n]sa* -compact
-.It Pa /dev/[n]sa*
+.Bl -tag -width /dev/[en]sa* -compact
+.It Pa /dev/[en]sa*
.El
.Sh SEE ALSO
.Xr mt 1 ,
.Xr tar 1 ,
-.Xr ast 4 ,
.Xr sa 4
.Sh HISTORY
The
@@ -300,8 +416,3 @@ manual appeared in
.Bx 4.2 .
An i386 version first appeared in
.Fx 2.2 .
-.Sh BUGS
-The status should be returned in a device independent format.
-.Pp
-The special file naming should be redone in a more consistent and
-understandable manner.
diff --git a/share/man/man4/sa.4 b/share/man/man4/sa.4
index aa72f68..ef7692f 100644
--- a/share/man/man4/sa.4
+++ b/share/man/man4/sa.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 23, 2013
+.Dd February 12, 2015
.Dt SA 4
.Os
.Sh NAME
@@ -285,10 +285,10 @@ device driver written and ported from
by
.An Julian Elischer .
.Pp
-The current owner of record is
-.An Matthew Jacob
-who has suffered too many
-years of breaking tape drivers.
+The owner of record for many years was
+.An Matthew Jacob .
+The current maintainer is
+.An Kenneth Merry
.Sh BUGS
This driver lacks many of the hacks required to deal with older devices.
Many older
@@ -305,7 +305,5 @@ for your device in order to read tapes written under
.Fx
2.X.
.Pp
-Fine grained density and compression mode support that is bound to specific
-device names needs to be added.
-.Pp
-Support for fast indexing by use of partitions is missing.
+Partitions are only supported for status information and location.
+It would be nice to add support for creating and editing tape partitions.
diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk
index e07b611..6ba1b79 100644
--- a/share/mk/bsd.libnames.mk
+++ b/share/mk/bsd.libnames.mk
@@ -95,6 +95,7 @@ LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a
LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a
.endif
LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a
+LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a
LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a
LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a
LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a
OpenPOWER on IntegriCloud