xref: /original-bsd/sys/dev/vnioctl.h (revision 3705696b)
1 /*
2  * Copyright (c) 1988 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: fdioctl.h 1.1 90/07/09$
13  *
14  *	@(#)vnioctl.h	8.1 (Berkeley) 06/10/93
15  */
16 
17 /*
18  * Ioctl definitions for file (vnode) disk pseudo-device.
19  */
20 
21 #define FDISKFILE	"/etc/fdisks"	/* default config file */
22 
23 struct vn_ioctl {
24 	char	*vn_file;	/* pathname of file to mount */
25 	int	vn_size;	/* (returned) size of disk */
26 };
27 
28 /*
29  * Before you can use a unit, it must be configured with VNIOCSET.
30  * The configuration persists across opens and closes of the device;
31  * an VNIOCCLR must be used to reset a configuration.  An attempt to
32  * VNIOCSET an already active unit will return EBUSY.
33  */
34 #define VNIOCSET	_IOWR('F', 0, struct vn_ioctl)	/* enable disk */
35 #define VNIOCCLR	_IOW('F', 1, struct vn_ioctl)	/* disable disk */
36