1 /* -*- linux-c -*- ------------------------------------------------------- *
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 #include <sys/ioctl.h>
21 /* This file describes autofs v3 */
22 #define AUTOFS_PROTO_VERSION 3
24 /* Range of protocol versions defined */
25 #define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
26 #define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
29 * Architectures where both 32- and 64-bit binaries can be executed
30 * on 64-bit kernels need this. This keeps the structure format
31 * uniform, and makes sure the wait_queue_token isn't too big to be
32 * passed back down to the kernel.
34 * This assumes that on these architectures:
36 * -------------------------
40 * If so, 32-bit user-space code should be backwards compatible.
43 #if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
44 || defined(__powerpc__) || defined(__s390__)
45 typedef unsigned int autofs_wqt_t;
47 typedef unsigned long autofs_wqt_t;
51 #define autofs_ptype_missing 0 /* Missing entry (mount request) */
52 #define autofs_ptype_expire 1 /* Expire entry (umount request) */
54 struct autofs_packet_hdr {
55 int proto_version; /* Protocol version */
56 int type; /* Type of packet */
59 struct autofs_packet_missing {
60 struct autofs_packet_hdr hdr;
61 autofs_wqt_t wait_queue_token;
63 char name[NAME_MAX+1];
66 /* v3 expire (via ioctl) */
67 struct autofs_packet_expire {
68 struct autofs_packet_hdr hdr;
70 char name[NAME_MAX+1];
73 #define AUTOFS_IOC_READY _IO(0x93,0x60)
74 #define AUTOFS_IOC_FAIL _IO(0x93,0x61)
75 #define AUTOFS_IOC_CATATONIC _IO(0x93,0x62)
76 #define AUTOFS_IOC_PROTOVER _IOR(0x93,0x63,int)
77 #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,compat_ulong_t)
78 #define AUTOFS_IOC_SETTIMEOUT _IOWR(0x93,0x64,unsigned long)
79 #define AUTOFS_IOC_EXPIRE _IOR(0x93,0x65,struct autofs_packet_expire)
81 #endif /* _LINUX_AUTO_FS_H */