um: Add myself as co-maintainer
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / linux / auto_fs.h
blobda64e15004b642b97d2d31da90231115fd2332ef
1 /* -*- linux-c -*- ------------------------------------------------------- *
2 *
3 * linux/include/linux/auto_fs.h
5 * Copyright 1997 Transmeta Corporation - All Rights Reserved
7 * This file is part of the Linux kernel and is made available under
8 * the terms of the GNU General Public License, version 2, or at your
9 * option, any later version, incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
14 #ifndef _LINUX_AUTO_FS_H
15 #define _LINUX_AUTO_FS_H
17 #include <linux/types.h>
18 #ifdef __KERNEL__
19 #include <linux/fs.h>
20 #include <linux/limits.h>
21 #include <linux/ioctl.h>
22 #else
23 #include <sys/ioctl.h>
24 #endif /* __KERNEL__ */
26 /* This file describes autofs v3 */
27 #define AUTOFS_PROTO_VERSION 3
29 /* Range of protocol versions defined */
30 #define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
31 #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
34 * Architectures where both 32- and 64-bit binaries can be executed
35 * on 64-bit kernels need this. This keeps the structure format
36 * uniform, and makes sure the wait_queue_token isn't too big to be
37 * passed back down to the kernel.
39 * This assumes that on these architectures:
40 * mode 32 bit 64 bit
41 * -------------------------
42 * int 32 bit 32 bit
43 * long 32 bit 64 bit
45 * If so, 32-bit user-space code should be backwards compatible.
48 #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
49 || defined(__powerpc__) || defined(__s390__)
50 typedef unsigned int autofs_wqt_t;
51 #else
52 typedef unsigned long autofs_wqt_t;
53 #endif
55 /* Packet types */
56 #define autofs_ptype_missing 0 /* Missing entry (mount request) */
57 #define autofs_ptype_expire 1 /* Expire entry (umount request) */
59 struct autofs_packet_hdr {
60 int proto_version; /* Protocol version */
61 int type; /* Type of packet */
64 struct autofs_packet_missing {
65 struct autofs_packet_hdr hdr;
66 autofs_wqt_t wait_queue_token;
67 int len;
68 char name[NAME_MAX+1];
69 };
71 /* v3 expire (via ioctl) */
72 struct autofs_packet_expire {
73 struct autofs_packet_hdr hdr;
74 int len;
75 char name[NAME_MAX+1];
78 #define AUTOFS_IOC_READY _IO(0x93,0x60)
79 #define AUTOFS_IOC_FAIL _IO(0x93,0x61)
80 #define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
81 #define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
82 #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)
83 #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
84 #define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
86 #endif /* _LINUX_AUTO_FS_H */