1
/* @(#)mtiodefs.h 1.4 02/08/26 Copyright 1995,2000-2002 J. Schilling */
3
* Generic header for users of magnetic tape ioctl interface.
5
* If there is no local mtio.h or equivalent, define
6
* simplified mtio definitions here in order
7
* to be able to do at least remote mtio on systems
8
* that have no local mtio
10
* Copyright (c) 1995,2000-2002 J. Schilling
13
* This program is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2, or (at your option)
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* You should have received a copy of the GNU General Public License
24
* along with this program; see the file COPYING. If not, write to
25
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
35
#ifdef HAVE_SYS_MTIO_H
39
#else /* ! HAVE_SYS_MTIO_H */
47
* Definitions for magnetic tape io control commands
51
* structure for MTIOCTOP - magnetic tape operation command
54
short mt_op; /* op code (see below) */
55
daddr_t mt_count; /* repeat count or param */
59
* op code values for mt_op
61
#define MTWEOF 0 /* write EOF record(s) */
62
#define MTFSF 1 /* fwd space over file mark(s) */
63
#define MTBSF 2 /* back space over file mark(s) (1/2" only ) */
64
#define MTFSR 3 /* fwd space record(s) (to inter-record gap) */
65
#define MTBSR 4 /* back space record(s) (to inter-record gap)*/
66
#define MTREW 5 /* rewind tape */
67
#define MTOFFL 6 /* rewind and put the drive offline */
68
#define MTNOP 7 /* no operation (sets status ?) */
71
* structure for MTIOCGET - magnetic tape get status command
74
short mt_type; /* type of magnetic tape device */
75
/* the next two regs are device dependent */
76
short mt_dsreg; /* drive status 'register' */
77
short mt_erreg; /* error 'register' */
78
daddr_t mt_resid; /* transfer residual count */
79
daddr_t mt_fileno; /* file # for current position */
80
daddr_t mt_blkno; /* block # for current position */
83
#define HAVE_MTGET_TYPE
84
#define HAVE_MTGET_DSREG
85
#define HAVE_MTGET_ERREG
86
#define HAVE_MTGET_RESID
87
#define HAVE_MTGET_FILENO
88
#define HAVE_MTGET_BLKNO
91
* Define some junk here as software may assume that these two definitions
94
#define MTIOCGET 0x12340001
95
#define MTIOCTOP 0x12340002
101
#endif /* HAVE_SYS_MTIO_H */
103
#endif /* _MTIODEFS_H */