From a7cc6443dad4e77d3f045ac584c765aecafc26f6 Mon Sep 17 00:00:00 2001 From: Nate Willams Date: Thu, 29 Jul 1993 11:50:47 +0000 Subject: [PATCH] Added functionality needed for new st(8) [ SCSI TAPE control ] program and the new scsi/st.c driver. Most of this is for variable block-size tape drives. --- sys/sys/mtio.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/sys/sys/mtio.h b/sys/sys/mtio.h index e42c92bd02..4a07432cff 100644 --- a/sys/sys/mtio.h +++ b/sys/sys/mtio.h @@ -54,6 +54,26 @@ struct mtop { #define MTNOP 7 /* no operation, sets status only */ #define MTCACHE 8 /* enable controller cache */ #define MTNOCACHE 9 /* disable controller cache */ +#if defined(__386BSD__) +#define MTSETBSIZ 10 /* Set block size for device */ + /* If device is a variable size dev */ + /* a non zero parameter will change */ + /* the device to a fixed block size */ + /* device with block size set to */ + /* that of the parameter passed in. */ + /* Resetting the block size to 0 will */ + /* restore the device to a variable */ + /* block size device. */ + + /* This ioctl is a noop on fixed block */ + /* devices. */ + +#define MTSETHDNSTY 11 /* Set default high density values for device */ +#define MTSETMDNSTY 12 /* Set default medium density values for device */ +#define MTSETLDNSTY 13 /* Set default low density values for device */ + /* These values are as defined in SCSI II spec */ + /* and range from 0 to 0x17 */ +#endif /* structure for MTIOCGET - mag tape get status command */ @@ -63,11 +83,18 @@ struct mtget { short mt_dsreg; /* ``drive status'' register */ short mt_erreg; /* ``error'' register */ /* end device-dependent registers */ - short mt_resid; /* residual count */ + daddr_t mt_resid; /* residual count */ +#if defined (__386BSD__) + daddr_t mt_bsiz; /* block size, 0 is variable */ + short mt_dns_high; /* density setting for high density */ + short mt_dns_medium; /* density setting for medium density */ + short mt_dns_low; /* density setting for low density */ +#endif /* the following two are not yet implemented */ daddr_t mt_fileno; /* file number of current position */ daddr_t mt_blkno; /* block number of current position */ /* end not yet implemented */ + u_short mt_flags; /* Solbourne compatiable way of getting r/w status */ }; /* @@ -92,6 +119,11 @@ struct mtget { #define MT_ISPYTHON 0x0f /* Archive Python (DAT) */ #define MT_ISHPDAT 0x10 /* HP 35450A DAT drive */ +/* + * Constants for mt_flags structure. + */ +#define MTF_WRITE_PROT 0x8000 /* write protect status of tape */ + /* 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 */ -- 2.20.1