Deleted Added
full compact
mtio.4 (227418) mtio.4 (231564)
1.\" Copyright (c) 1996
2.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved.
3.\"
4.\" Copyright (c) 1983, 1991, 1993
5.\" The Regents of the University of California. All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" @(#)mtio.4 8.1 (Berkeley) 6/5/93
1.\" Copyright (c) 1996
2.\" Mike Pritchard <mpp@FreeBSD.org>. All rights reserved.
3.\"
4.\" Copyright (c) 1983, 1991, 1993
5.\" The Regents of the University of California. All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" @(#)mtio.4 8.1 (Berkeley) 6/5/93
36.\" $FreeBSD: head/share/man/man4/mtio.4 227418 2011-11-10 11:17:40Z pluknet $
36.\" $FreeBSD: head/share/man/man4/mtio.4 231564 2012-02-12 18:29:56Z ed $
37.\"
38.Dd November 11, 2011
39.Dt MTIO 4
40.Os
41.Sh NAME
42.Nm mtio
43.Nd FreeBSD magtape interface
44.Sh DESCRIPTION

--- 125 unchanged lines hidden (view full) ---

170 * be nonsense because the size of the residual may (greatly)
171 * exceed 32 K-bytes. Use the MTIOCERRSTAT ioctl to get a
172 * more accurate count.
173 */
174 short mt_resid; /* residual count */
175#if defined (__FreeBSD__)
176 int32_t mt_blksiz; /* presently operating blocksize */
177 int32_t mt_density; /* presently operating density */
37.\"
38.Dd November 11, 2011
39.Dt MTIO 4
40.Os
41.Sh NAME
42.Nm mtio
43.Nd FreeBSD magtape interface
44.Sh DESCRIPTION

--- 125 unchanged lines hidden (view full) ---

170 * be nonsense because the size of the residual may (greatly)
171 * exceed 32 K-bytes. Use the MTIOCERRSTAT ioctl to get a
172 * more accurate count.
173 */
174 short mt_resid; /* residual count */
175#if defined (__FreeBSD__)
176 int32_t mt_blksiz; /* presently operating blocksize */
177 int32_t mt_density; /* presently operating density */
178 u_int32_t mt_comp; /* presently operating compression */
178 uint32_t mt_comp; /* presently operating compression */
179 int32_t mt_blksiz0; /* blocksize for mode 0 */
180 int32_t mt_blksiz1; /* blocksize for mode 1 */
181 int32_t mt_blksiz2; /* blocksize for mode 2 */
182 int32_t mt_blksiz3; /* blocksize for mode 3 */
183 int32_t mt_density0; /* density for mode 0 */
184 int32_t mt_density1; /* density for mode 1 */
185 int32_t mt_density2; /* density for mode 2 */
186 int32_t mt_density3; /* density for mode 3 */
187/* the following are not yet implemented */
179 int32_t mt_blksiz0; /* blocksize for mode 0 */
180 int32_t mt_blksiz1; /* blocksize for mode 1 */
181 int32_t mt_blksiz2; /* blocksize for mode 2 */
182 int32_t mt_blksiz3; /* blocksize for mode 3 */
183 int32_t mt_density0; /* density for mode 0 */
184 int32_t mt_density1; /* density for mode 1 */
185 int32_t mt_density2; /* density for mode 2 */
186 int32_t mt_density3; /* density for mode 3 */
187/* the following are not yet implemented */
188 u_int32_t mt_comp0; /* compression type for mode 0 */
189 u_int32_t mt_comp1; /* compression type for mode 1 */
190 u_int32_t mt_comp2; /* compression type for mode 2 */
191 u_int32_t mt_comp3; /* compression type for mode 3 */
188 uint32_t mt_comp0; /* compression type for mode 0 */
189 uint32_t mt_comp1; /* compression type for mode 1 */
190 uint32_t mt_comp2; /* compression type for mode 2 */
191 uint32_t mt_comp3; /* compression type for mode 3 */
192/* end not yet implemented */
193#endif
194 int32_t mt_fileno; /* relative file number of current position */
195 int32_t mt_blkno; /* relative block number of current position */
196};
197
198/* structure for MTIOCERRSTAT - tape get error status command */
199/* really only supported for SCSI tapes right now */
200struct scsi_tape_errors {
201 /*
202 * These are latched from the last command that had a SCSI
203 * Check Condition noted for these operations. The act
204 * of issuing an MTIOCERRSTAT unlatches and clears them.
205 */
192/* end not yet implemented */
193#endif
194 int32_t mt_fileno; /* relative file number of current position */
195 int32_t mt_blkno; /* relative block number of current position */
196};
197
198/* structure for MTIOCERRSTAT - tape get error status command */
199/* really only supported for SCSI tapes right now */
200struct scsi_tape_errors {
201 /*
202 * These are latched from the last command that had a SCSI
203 * Check Condition noted for these operations. The act
204 * of issuing an MTIOCERRSTAT unlatches and clears them.
205 */
206 u_int8_t io_sense[32]; /* Last Sense Data For Data I/O */
206 uint8_t io_sense[32]; /* Last Sense Data For Data I/O */
207 int32_t io_resid; /* residual count from last Data I/O */
207 int32_t io_resid; /* residual count from last Data I/O */
208 u_int8_t io_cdb[16]; /* Command that Caused the Last Data Sense */
209 u_int8_t ctl_sense[32]; /* Last Sense Data For Control I/O */
208 uint8_t io_cdb[16]; /* Command that Caused the Last Data Sense */
209 uint8_t ctl_sense[32]; /* Last Sense Data For Control I/O */
210 int32_t ctl_resid; /* residual count from last Control I/O */
210 int32_t ctl_resid; /* residual count from last Control I/O */
211 u_int8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */
211 uint8_t ctl_cdb[16]; /* Command that Caused the Last Control Sense */
212 /*
213 * These are the read and write cumulative error counters.
214 * (how to reset cumulative error counters is not yet defined).
215 * (not implemented as yet but space is being reserved for them)
216 */
217 struct {
212 /*
213 * These are the read and write cumulative error counters.
214 * (how to reset cumulative error counters is not yet defined).
215 * (not implemented as yet but space is being reserved for them)
216 */
217 struct {
218 u_int32_t retries; /* total # retries performed */
219 u_int32_t corrected; /* total # corrections performed */
220 u_int32_t processed; /* total # corrections successful */
221 u_int32_t failures; /* total # corrections/retries failed */
222 u_int64_t nbytes; /* total # bytes processed */
218 uint32_t retries; /* total # retries performed */
219 uint32_t corrected; /* total # corrections performed */
220 uint32_t processed; /* total # corrections successful */
221 uint32_t failures; /* total # corrections/retries failed */
222 uint64_t nbytes; /* total # bytes processed */
223 } wterr, rderr;
224};
225
226union mterrstat {
227 struct scsi_tape_errors scsi_errstat;
228 char _reserved_padding[256];
229};
230

--- 29 unchanged lines hidden (view full) ---

260#define MTIOCIEOT _IO('m', 3) /* ignore EOT error */
261#define MTIOCEEOT _IO('m', 4) /* enable EOT error */
262/*
263 * When more SCSI-3 SSC (streaming device) devices are out there
264 * that support the full 32 byte type 2 structure, we'll have to
265 * rethink these ioctls to support all the entities they haul into
266 * the picture (64 bit blocks, logical file record numbers, etc..).
267 */
223 } wterr, rderr;
224};
225
226union mterrstat {
227 struct scsi_tape_errors scsi_errstat;
228 char _reserved_padding[256];
229};
230

--- 29 unchanged lines hidden (view full) ---

260#define MTIOCIEOT _IO('m', 3) /* ignore EOT error */
261#define MTIOCEEOT _IO('m', 4) /* enable EOT error */
262/*
263 * When more SCSI-3 SSC (streaming device) devices are out there
264 * that support the full 32 byte type 2 structure, we'll have to
265 * rethink these ioctls to support all the entities they haul into
266 * the picture (64 bit blocks, logical file record numbers, etc..).
267 */
268#define MTIOCRDSPOS _IOR('m', 5, u_int32_t) /* get logical blk addr */
269#define MTIOCRDHPOS _IOR('m', 6, u_int32_t) /* get hardware blk addr */
270#define MTIOCSLOCATE _IOW('m', 5, u_int32_t) /* seek to logical blk addr */
271#define MTIOCHLOCATE _IOW('m', 6, u_int32_t) /* seek to hardware blk addr */
268#define MTIOCRDSPOS _IOR('m', 5, uint32_t) /* get logical blk addr */
269#define MTIOCRDHPOS _IOR('m', 6, uint32_t) /* get hardware blk addr */
270#define MTIOCSLOCATE _IOW('m', 5, uint32_t) /* seek to logical blk addr */
271#define MTIOCHLOCATE _IOW('m', 6, uint32_t) /* seek to hardware blk addr */
272#define MTIOCERRSTAT _IOR('m', 7, union mterrstat) /* get tape errors */
273/*
274 * Set EOT model- argument is number of filemarks to end a tape with.
275 * Note that not all possible values will be accepted.
276 */
272#define MTIOCERRSTAT _IOR('m', 7, union mterrstat) /* get tape errors */
273/*
274 * Set EOT model- argument is number of filemarks to end a tape with.
275 * Note that not all possible values will be accepted.
276 */
277#define MTIOCSETEOTMODEL _IOW('m', 8, u_int32_t)
277#define MTIOCSETEOTMODEL _IOW('m', 8, uint32_t)
278/* Get current EOT model */
278/* Get current EOT model */
279#define MTIOCGETEOTMODEL _IOR('m', 8, u_int32_t)
279#define MTIOCGETEOTMODEL _IOR('m', 8, uint32_t)
280
281#ifndef _KERNEL
282#define DEFTAPE "/dev/nsa0"
283#endif
284
285#endif /* !_SYS_MTIO_H_ */
286.Ed
287.Sh FILES

--- 20 unchanged lines hidden ---
280
281#ifndef _KERNEL
282#define DEFTAPE "/dev/nsa0"
283#endif
284
285#endif /* !_SYS_MTIO_H_ */
286.Ed
287.Sh FILES

--- 20 unchanged lines hidden ---