]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* -*- linux-c -*- ------------------------------------------------------- * |
2 | * | |
3 | * linux/include/linux/auto_fs.h | |
4 | * | |
5 | * Copyright 1997 Transmeta Corporation - All Rights Reserved | |
6 | * | |
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. | |
10 | * | |
11 | * ----------------------------------------------------------------------- */ | |
12 | ||
13 | ||
14 | #ifndef _LINUX_AUTO_FS_H | |
15 | #define _LINUX_AUTO_FS_H | |
16 | ||
17 | #ifdef __KERNEL__ | |
18 | #include <linux/fs.h> | |
19 | #include <linux/limits.h> | |
79955898 IK |
20 | #include <linux/types.h> |
21 | #include <linux/ioctl.h> | |
22 | #else | |
1da177e4 | 23 | #include <asm/types.h> |
79955898 | 24 | #include <sys/ioctl.h> |
1da177e4 LT |
25 | #endif /* __KERNEL__ */ |
26 | ||
1da177e4 LT |
27 | /* This file describes autofs v3 */ |
28 | #define AUTOFS_PROTO_VERSION 3 | |
29 | ||
30 | /* Range of protocol versions defined */ | |
31 | #define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION | |
32 | #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION | |
33 | ||
34 | /* | |
35 | * Architectures where both 32- and 64-bit binaries can be executed | |
36 | * on 64-bit kernels need this. This keeps the structure format | |
37 | * uniform, and makes sure the wait_queue_token isn't too big to be | |
38 | * passed back down to the kernel. | |
39 | * | |
40 | * This assumes that on these architectures: | |
41 | * mode 32 bit 64 bit | |
42 | * ------------------------- | |
43 | * int 32 bit 32 bit | |
44 | * long 32 bit 64 bit | |
45 | * | |
46 | * If so, 32-bit user-space code should be backwards compatible. | |
47 | */ | |
48 | ||
49 | #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \ | |
50 | || defined(__powerpc__) || defined(__s390__) | |
51 | typedef unsigned int autofs_wqt_t; | |
52 | #else | |
53 | typedef unsigned long autofs_wqt_t; | |
54 | #endif | |
55 | ||
56 | /* Packet types */ | |
57 | #define autofs_ptype_missing 0 /* Missing entry (mount request) */ | |
58 | #define autofs_ptype_expire 1 /* Expire entry (umount request) */ | |
59 | ||
60 | struct autofs_packet_hdr { | |
61 | int proto_version; /* Protocol version */ | |
62 | int type; /* Type of packet */ | |
63 | }; | |
64 | ||
65 | struct autofs_packet_missing { | |
66 | struct autofs_packet_hdr hdr; | |
67 | autofs_wqt_t wait_queue_token; | |
68 | int len; | |
69 | char name[NAME_MAX+1]; | |
70 | }; | |
71 | ||
72 | /* v3 expire (via ioctl) */ | |
73 | struct autofs_packet_expire { | |
74 | struct autofs_packet_hdr hdr; | |
75 | int len; | |
76 | char name[NAME_MAX+1]; | |
77 | }; | |
78 | ||
79 | #define AUTOFS_IOC_READY _IO(0x93,0x60) | |
80 | #define AUTOFS_IOC_FAIL _IO(0x93,0x61) | |
81 | #define AUTOFS_IOC_CATATONIC _IO(0x93,0x62) | |
82 | #define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int) | |
83 | #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long) | |
84 | #define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire) | |
85 | ||
86 | #endif /* _LINUX_AUTO_FS_H */ |