summaryrefslogtreecommitdiffstats
path: root/share/man/man4/mtio.4
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-01-05 16:52:34 +0000
committerbde <bde@FreeBSD.org>2000-01-05 16:52:34 +0000
commit0a07530306e8a226660cc90c8913706f5f072421 (patch)
treed3dfae178645c7cd7a2594fd1bc78bfc35627276 /share/man/man4/mtio.4
parent4ca3fc66620f95a46eb06a6a6fd3a556bd173273 (diff)
downloadFreeBSD-src-0a07530306e8a226660cc90c8913706f5f072421.zip
FreeBSD-src-0a07530306e8a226660cc90c8913706f5f072421.tar.gz
Refreshed the silly literal copy of <sys/mtio.h>. _KERNEL was still
spelled KERNEL...
Diffstat (limited to 'share/man/man4/mtio.4')
-rw-r--r--share/man/man4/mtio.444
1 files changed, 30 insertions, 14 deletions
diff --git a/share/man/man4/mtio.4 b/share/man/man4/mtio.4
index 18c8ad2..524ea63 100644
--- a/share/man/man4/mtio.4
+++ b/share/man/man4/mtio.4
@@ -82,6 +82,14 @@ on raw magnetic tape.
The following definitions are from
.Aq Pa sys/mtio.h :
.Bd -literal
+#ifndef _SYS_MTIO_H_
+#define _SYS_MTIO_H_
+
+#ifndef _KERNEL
+#include <sys/types.h>
+#endif
+#include <sys/ioccom.h>
+
/*
* Structures and definitions for mag tape io control commands
*/
@@ -113,8 +121,7 @@ struct mtop {
#define MTSETBSIZ 10
-/* Set density values for device. They are defined in the SCSI II spec */
-/* and range from 0 to 0x17. Sets the value for the opened mode only */
+/* Set density values for device. Sets the value for the opened mode only. */
#define MTSETDNSTY 11
@@ -146,9 +153,9 @@ struct mtop {
#define MTIO_DSREG_REW 43 /* Rewinding */
#define MTIO_DSREG_TEN 44 /* Retensioning */
#define MTIO_DSREG_UNL 45 /* Unloading */
-#define MTIO_DSREG_LD 46 /* Unloading */
+#define MTIO_DSREG_LD 46 /* Loading */
-#endif
+#endif /* __FreeBSD__ */
/* structure for MTIOCGET - mag tape get status command */
@@ -162,7 +169,7 @@ struct mtget {
#if defined (__FreeBSD__)
daddr_t mt_blksiz; /* presently operating blocksize */
daddr_t mt_density; /* presently operating density */
- daddr_t mt_comp; /* presently operating compression */
+ u_int32_t mt_comp; /* presently operating compression */
daddr_t mt_blksiz0; /* blocksize for mode 0 */
daddr_t mt_blksiz1; /* blocksize for mode 1 */
daddr_t mt_blksiz2; /* blocksize for mode 2 */
@@ -172,14 +179,14 @@ struct mtget {
daddr_t mt_density2; /* density for mode 2 */
daddr_t mt_density3; /* density for mode 3 */
/* the following are not yet implemented */
- u_char mt_comp0; /* compression type for mode 0 */
- u_char mt_comp1; /* compression type for mode 1 */
- u_char mt_comp2; /* compression type for mode 2 */
- u_char mt_comp3; /* compression type for mode 3 */
+ u_int32_t mt_comp0; /* compression type for mode 0 */
+ u_int32_t mt_comp1; /* compression type for mode 1 */
+ u_int32_t mt_comp2; /* compression type for mode 2 */
+ u_int32_t mt_comp3; /* compression type for mode 3 */
/* end not yet implemented */
#endif
- daddr_t mt_fileno; /* file number of current position */
- daddr_t mt_blkno; /* block number of current position */
+ daddr_t mt_fileno; /* relative file number of current position */
+ daddr_t mt_blkno; /* relative block number of current position */
};
/* structure for MTIOCERRSTAT - tape get error status command */
@@ -214,6 +221,7 @@ union mterrstat {
struct scsi_tape_errors scsi_errstat;
char _reserved_padding[256];
};
+
/*
* Constants for mt_type byte. These are the same
* for controllers compatible with the types listed.
@@ -256,12 +264,19 @@ union mterrstat {
#define MTIOCSLOCATE _IOW('m', 5, u_int32_t) /* seek to logical blk addr */
#define MTIOCHLOCATE _IOW('m', 6, u_int32_t) /* seek to hardware blk addr */
#define MTIOCERRSTAT _IOR('m', 7, union mterrstat) /* get tape errors */
+/*
+ * Set EOT model- argument is number of filemarks to end a tape with.
+ * Note that not all possible values will be accepted.
+ */
+#define MTIOCSETEOTMODEL _IOW('m', 8, u_int32_t)
+/* Get current EOT model */
+#define MTIOCGETEOTMODEL _IOR('m', 8, u_int32_t)
-#ifndef KERNEL
+#ifndef _KERNEL
#define DEFTAPE "/dev/nrsa0"
#endif
-#ifdef KERNEL
+#ifdef _KERNEL
/*
* minor device number
*/
@@ -274,7 +289,8 @@ union mterrstat {
#define T_6250BPI 020 /* select 6250 bpi */
#define T_BADBPI 030 /* undefined selection */
#endif
-#endif /* _SYS_MTIO_H_ */
+
+#endif /* !_SYS_MTIO_H_ */
.Ed
.Pp
.Sh FILES
OpenPOWER on IntegriCloud