Commit | Line | Data |
---|---|---|
e9a7c2f1 | 1 | /* |
607ca46e DH |
2 | * Copyright 1997 Transmeta Corporation - All Rights Reserved |
3 | * | |
4 | * This file is part of the Linux kernel and is made available under | |
5 | * the terms of the GNU General Public License, version 2, or at your | |
6 | * option, any later version, incorporated herein by reference. | |
7 | * | |
8 | * ----------------------------------------------------------------------- */ | |
9 | ||
10 | ||
11 | #ifndef _UAPI_LINUX_AUTO_FS_H | |
12 | #define _UAPI_LINUX_AUTO_FS_H | |
13 | ||
14 | #include <linux/types.h> | |
15 | #ifndef __KERNEL__ | |
16 | #include <sys/ioctl.h> | |
17 | #endif /* __KERNEL__ */ | |
18 | ||
19 | ||
20 | /* This file describes autofs v3 */ | |
21 | #define AUTOFS_PROTO_VERSION 3 | |
22 | ||
23 | /* Range of protocol versions defined */ | |
24 | #define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION | |
25 | #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION | |
26 | ||
27 | /* | |
4f4ffc3a HD |
28 | * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed |
29 | * back to the kernel via ioctl from userspace. On architectures where 32- and | |
30 | * 64-bit userspace binaries can be executed it's important that the size of | |
31 | * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we | |
32 | * do not break the binary ABI interface by changing the structure size. | |
607ca46e | 33 | */ |
4f4ffc3a | 34 | #if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */ |
607ca46e | 35 | typedef unsigned long autofs_wqt_t; |
4f4ffc3a HD |
36 | #else |
37 | typedef unsigned int autofs_wqt_t; | |
607ca46e DH |
38 | #endif |
39 | ||
40 | /* Packet types */ | |
41 | #define autofs_ptype_missing 0 /* Missing entry (mount request) */ | |
42 | #define autofs_ptype_expire 1 /* Expire entry (umount request) */ | |
43 | ||
44 | struct autofs_packet_hdr { | |
45 | int proto_version; /* Protocol version */ | |
46 | int type; /* Type of packet */ | |
47 | }; | |
48 | ||
49 | struct autofs_packet_missing { | |
50 | struct autofs_packet_hdr hdr; | |
0266725a | 51 | autofs_wqt_t wait_queue_token; |
607ca46e DH |
52 | int len; |
53 | char name[NAME_MAX+1]; | |
54 | }; | |
55 | ||
56 | /* v3 expire (via ioctl) */ | |
57 | struct autofs_packet_expire { | |
58 | struct autofs_packet_hdr hdr; | |
59 | int len; | |
60 | char name[NAME_MAX+1]; | |
61 | }; | |
62 | ||
e9a7c2f1 IK |
63 | #define AUTOFS_IOC_READY _IO(0x93, 0x60) |
64 | #define AUTOFS_IOC_FAIL _IO(0x93, 0x61) | |
65 | #define AUTOFS_IOC_CATATONIC _IO(0x93, 0x62) | |
66 | #define AUTOFS_IOC_PROTOVER _IOR(0x93, 0x63, int) | |
67 | #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93, 0x64, compat_ulong_t) | |
68 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93, 0x64, unsigned long) | |
69 | #define AUTOFS_IOC_EXPIRE _IOR(0x93, 0x65, struct autofs_packet_expire) | |
607ca46e DH |
70 | |
71 | #endif /* _UAPI_LINUX_AUTO_FS_H */ |