1
2
3
4
5
6
7
8
9
10
11
12#ifndef _UAPI_LINUX_AUTO_FS_H
13#define _UAPI_LINUX_AUTO_FS_H
14
15#include <linux/types.h>
16#include <linux/limits.h>
17#ifndef __KERNEL__
18#include <sys/ioctl.h>
19#endif
20
21
22
23#define AUTOFS_PROTO_VERSION 3
24
25
26#define AUTOFS_MAX_PROTO_VERSION AUTOFS_PROTO_VERSION
27#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION
28
29
30
31
32
33
34
35
36#if defined(__ia64__) || defined(__alpha__)
37typedef unsigned long autofs_wqt_t;
38#else
39typedef unsigned int autofs_wqt_t;
40#endif
41
42
43#define autofs_ptype_missing 0
44#define autofs_ptype_expire 1
45
46struct autofs_packet_hdr {
47 int proto_version;
48 int type;
49};
50
51struct autofs_packet_missing {
52 struct autofs_packet_hdr hdr;
53 autofs_wqt_t wait_queue_token;
54 int len;
55 char name[NAME_MAX+1];
56};
57
58
59struct autofs_packet_expire {
60 struct autofs_packet_hdr hdr;
61 int len;
62 char name[NAME_MAX+1];
63};
64
65#define AUTOFS_IOCTL 0x93
66
67enum {
68 AUTOFS_IOC_READY_CMD = 0x60,
69 AUTOFS_IOC_FAIL_CMD,
70 AUTOFS_IOC_CATATONIC_CMD,
71 AUTOFS_IOC_PROTOVER_CMD,
72 AUTOFS_IOC_SETTIMEOUT_CMD,
73 AUTOFS_IOC_EXPIRE_CMD,
74};
75
76#define AUTOFS_IOC_READY _IO(AUTOFS_IOCTL, AUTOFS_IOC_READY_CMD)
77#define AUTOFS_IOC_FAIL _IO(AUTOFS_IOCTL, AUTOFS_IOC_FAIL_CMD)
78#define AUTOFS_IOC_CATATONIC _IO(AUTOFS_IOCTL, AUTOFS_IOC_CATATONIC_CMD)
79#define AUTOFS_IOC_PROTOVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOVER_CMD, int)
80#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, compat_ulong_t)
81#define AUTOFS_IOC_SETTIMEOUT _IOWR(AUTOFS_IOCTL, AUTOFS_IOC_SETTIMEOUT_CMD, unsigned long)
82#define AUTOFS_IOC_EXPIRE _IOR(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_CMD, struct autofs_packet_expire)
83
84#endif
85