summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/sys/mtio.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h
index 5eae516624e..27b0dd6efd2 100644
--- a/sys/sys/mtio.h
+++ b/sys/sys/mtio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtio.h,v 1.4 1997/04/16 04:19:09 millert Exp $ */
+/* $OpenBSD: mtio.h,v 1.5 1998/07/23 08:46:34 deraadt Exp $ */
/* $NetBSD: mtio.h,v 1.14 1997/04/15 06:50:19 lukem Exp $ */
/*
@@ -115,12 +115,27 @@ struct mtget {
#define MT_ISTK50 0x12 /* DEC SCSI TK50 */
#define MT_ISMT02 0x13 /* Emulex MT02 SCSI tape controller */
+/* bits defined for the mt_dsreg field */
+#define MT_DS_RDONLY 0x10 /* tape mounted readonly */
+#define MT_DS_MOUNTED 0x03 /* tape mounted (for control opens) */
+
/* mag tape io control commands */
#define MTIOCTOP _IOW('m', 1, struct mtop) /* do a mag tape op */
#define MTIOCGET _IOR('m', 2, struct mtget) /* get tape status */
#define MTIOCIEOT _IO('m', 3) /* ignore EOT error */
#define MTIOCEEOT _IO('m', 4) /* enable EOT error */
+/*
+ * When more SCSI-3 SSC (streaming device) devices are out there
+ * that support the full 32 byte type 2 structure, we'll have to
+ * rethink these ioctls to support all the entities they haul into
+ * the picture (64 bit blocks, logical file record numbers, etc..).
+ */
+#define MTIOCRDSPOS _IOR('m', 5, u_int32_t) /* get logical blk addr */
+#define MTIOCRDHPOS _IOR('m', 6, u_int32_t) /* get hardware blk addr */
+#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 */
+
#ifdef _KERNEL
/*
* minor device number