xref: /original-bsd/sys/hp300/dev/acioctl.h (revision 3705696b)
1 /*
2  * Copyright (c) 1991 University of Utah.
3  * Copyright (c) 1990, 1993
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * the Systems Programming Group of the University of Utah Computer
8  * Science Department.
9  *
10  * %sccs.include.redist.c%
11  *
12  * from: Utah $Hdr: acioctl.h 1.1 91/06/19$
13  *
14  *	@(#)acioctl.h	8.1 (Berkeley) 06/10/93
15  */
16 
17 struct acinfo {
18 	short	fmte;		/* 1st medium transport elt (picker) */
19 	short	nmte;		/* # medium transport elts */
20 	short	fse;		/* 1st storage elt (slot) */
21 	short	nse;		/* # storage elts */
22 	short	fiee;		/* 1st import/export elt (mailslot) */
23 	short	niee;		/* # import/export elts */
24 	short	fdte;		/* 1st data transport elt (drive) */
25 	short	ndte;		/* # data transport elts */
26 };
27 
28 struct aceltstat {
29 	short	eaddr;		/* element adress */
30 	char	type;		/* type of element */
31 	char	flags;		/* flags */
32 };
33 
34 /* types */
35 #define AC_MTE		0x01	/* picker */
36 #define AC_SE		0x02	/* slot */
37 #define AC_IEE		0x03	/* mailslot */
38 #define AC_DTE		0x04	/* drive */
39 /* flags */
40 #define AC_FULL		0x01	/* media present */
41 #define	AC_ERROR	0x04	/* error accessing element */
42 #define AC_ACCESS	0x08	/* element accessible */
43 #define AC_INVERT	0x80	/* media inverted prior to insertion */
44 
45 struct acmove {
46 	short	srcelem;
47 	short	dstelem;
48 	short	flags;
49 };
50 
51 struct acbuffer {
52 	char	*bufptr;
53 	int	buflen;
54 };
55 
56 #define ACIOCINIT	_IO('A', 0x1)			/* init elt status */
57 #define ACIOCGINFO	_IOR('A', 0x2, struct acinfo)	/* mode sense */
58 #define ACIOCGSTAT	_IOW('A', 0x3, struct acbuffer)	/* read elem status */
59 #define ACIOCMOVE	_IOW('A', 0x4, struct acmove)	/* move elem */
60 #define ACIOCRAWES	_IOW('A', 0x5, struct acbuffer)	/* raw element stat */
61