xref: /freebsd-src/bin/chio/defs.h (revision 2a63c3be158216222d89a073dcbd6a72ee4aab5a)
1224c8a5bSJoerg Wunsch 
2*9ddb49cbSWarner Losh /*-
3224c8a5bSJoerg Wunsch  * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
4224c8a5bSJoerg Wunsch  * All rights reserved.
5224c8a5bSJoerg Wunsch  *
6224c8a5bSJoerg Wunsch  * Redistribution and use in source and binary forms, with or without
7224c8a5bSJoerg Wunsch  * modification, are permitted provided that the following conditions
8224c8a5bSJoerg Wunsch  * are met:
9224c8a5bSJoerg Wunsch  * 1. Redistributions of source code must retain the above copyright
10224c8a5bSJoerg Wunsch  *    notice, this list of conditions and the following disclaimer.
11224c8a5bSJoerg Wunsch  * 2. Redistributions in binary form must reproduce the above copyright
12224c8a5bSJoerg Wunsch  *    notice, this list of conditions and the following disclaimer in the
13224c8a5bSJoerg Wunsch  *    documentation and/or other materials provided with the distribution.
14224c8a5bSJoerg Wunsch  * 3. All advertising materials mentioning features or use of this software
15224c8a5bSJoerg Wunsch  *    must display the following acknowledgements:
16224c8a5bSJoerg Wunsch  *	This product includes software developed by Jason R. Thorpe
17224c8a5bSJoerg Wunsch  *	for And Communications, http://www.and.com/
18224c8a5bSJoerg Wunsch  * 4. The name of the author may not be used to endorse or promote products
19224c8a5bSJoerg Wunsch  *    derived from this software without specific prior written permission.
20224c8a5bSJoerg Wunsch  *
21224c8a5bSJoerg Wunsch  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22224c8a5bSJoerg Wunsch  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23224c8a5bSJoerg Wunsch  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24224c8a5bSJoerg Wunsch  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25224c8a5bSJoerg Wunsch  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26224c8a5bSJoerg Wunsch  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27224c8a5bSJoerg Wunsch  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28224c8a5bSJoerg Wunsch  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29224c8a5bSJoerg Wunsch  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30224c8a5bSJoerg Wunsch  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31224c8a5bSJoerg Wunsch  * SUCH DAMAGE.
32224c8a5bSJoerg Wunsch  */
33224c8a5bSJoerg Wunsch 
34224c8a5bSJoerg Wunsch struct element_type {
356c120f46SMike Heffner 	const	char *et_name;	/* name; i.e. "picker, "slot", etc. */
36224c8a5bSJoerg Wunsch 	int	et_type;	/* type number */
37224c8a5bSJoerg Wunsch };
38224c8a5bSJoerg Wunsch 
39224c8a5bSJoerg Wunsch struct changer_command {
406c120f46SMike Heffner 	const	char *cc_name;	/* command name */
41224c8a5bSJoerg Wunsch 				/* command handler */
425dce647cSWarner Losh 	int	(*cc_handler)(const char *, int, char **);
43224c8a5bSJoerg Wunsch };
44224c8a5bSJoerg Wunsch 
45224c8a5bSJoerg Wunsch struct special_word {
466c120f46SMike Heffner 	const	char *sw_name;	/* special word */
47224c8a5bSJoerg Wunsch 	int	sw_value;	/* token value */
48224c8a5bSJoerg Wunsch };
49224c8a5bSJoerg Wunsch 
50224c8a5bSJoerg Wunsch /* sw_value */
51224c8a5bSJoerg Wunsch #define SW_INVERT	1	/* set "invert media" flag */
52224c8a5bSJoerg Wunsch #define SW_INVERT1	2	/* set "invert media 1" flag */
53224c8a5bSJoerg Wunsch #define SW_INVERT2	3	/* set "invert media 2" flag */
54224c8a5bSJoerg Wunsch 
55224c8a5bSJoerg Wunsch /* Environment variable to check for default changer. */
56224c8a5bSJoerg Wunsch #define CHANGER_ENV_VAR		"CHANGER"
57