1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef _LINUX_AUTO_FS_H
15#define _LINUX_AUTO_FS_H
16
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
25
26
27#define AUTOFS_PROTO_VERSION 3
28
29
30#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
31#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
49 || defined(__powerpc__) || defined(__s390__)
50typedef unsigned int autofs_wqt_t;
51#else
52typedef unsigned long autofs_wqt_t;
53#endif
54
55
56#define autofs_ptype_missing 0
57#define autofs_ptype_expire 1
58
59struct autofs_packet_hdr {
60 int proto_version;
61 int type;
62};
63
64struct 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};
70
71
72struct autofs_packet_expire {
73 struct autofs_packet_hdr hdr;
74 int len;
75 char name[NAME_MAX+1];
76};
77
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)
85
86#endif
87