blob: be6766bc891e3cd750d48a36e5ea1f91712a30fc [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_AUTO_FS4_H
20#define _LINUX_AUTO_FS4_H
21#include <linux/types.h>
22#include <linux/auto_fs.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#undef AUTOFS_PROTO_VERSION
24#undef AUTOFS_MIN_PROTO_VERSION
25#undef AUTOFS_MAX_PROTO_VERSION
26#define AUTOFS_PROTO_VERSION 5
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define AUTOFS_MIN_PROTO_VERSION 3
28#define AUTOFS_MAX_PROTO_VERSION 5
29#define AUTOFS_PROTO_SUBVERSION 2
30#define AUTOFS_EXP_IMMEDIATE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define AUTOFS_EXP_LEAVES 2
32#define AUTOFS_TYPE_ANY 0U
33#define AUTOFS_TYPE_INDIRECT 1U
34#define AUTOFS_TYPE_DIRECT 2U
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define AUTOFS_TYPE_OFFSET 4U
36enum autofs_notify {
Tao Baod7db5942015-01-28 10:07:51 -080037 NFY_NONE,
38 NFY_MOUNT,
Tao Baod7db5942015-01-28 10:07:51 -080039 NFY_EXPIRE
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
41#define autofs_ptype_expire_multi 2
42#define autofs_ptype_missing_indirect 3
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define autofs_ptype_expire_indirect 4
44#define autofs_ptype_missing_direct 5
45#define autofs_ptype_expire_direct 6
46struct autofs_packet_expire_multi {
Tao Baod7db5942015-01-28 10:07:51 -080047 struct autofs_packet_hdr hdr;
48 autofs_wqt_t wait_queue_token;
49 int len;
50 char name[NAME_MAX + 1];
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52union autofs_packet_union {
Tao Baod7db5942015-01-28 10:07:51 -080053 struct autofs_packet_hdr hdr;
54 struct autofs_packet_missing missing;
Tao Baod7db5942015-01-28 10:07:51 -080055 struct autofs_packet_expire expire;
56 struct autofs_packet_expire_multi expire_multi;
Ben Cheng655a7c02013-10-16 16:09:24 -070057};
58struct autofs_v5_packet {
Tao Baod7db5942015-01-28 10:07:51 -080059 struct autofs_packet_hdr hdr;
60 autofs_wqt_t wait_queue_token;
61 __u32 dev;
62 __u64 ino;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u32 uid;
64 __u32 gid;
65 __u32 pid;
66 __u32 tgid;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 len;
68 char name[NAME_MAX + 1];
Ben Cheng655a7c02013-10-16 16:09:24 -070069};
70typedef struct autofs_v5_packet autofs_packet_missing_indirect_t;
Ben Cheng655a7c02013-10-16 16:09:24 -070071typedef struct autofs_v5_packet autofs_packet_expire_indirect_t;
72typedef struct autofs_v5_packet autofs_packet_missing_direct_t;
73typedef struct autofs_v5_packet autofs_packet_expire_direct_t;
74union autofs_v5_packet_union {
Tao Baod7db5942015-01-28 10:07:51 -080075 struct autofs_packet_hdr hdr;
76 struct autofs_v5_packet v5_packet;
77 autofs_packet_missing_indirect_t missing_indirect;
78 autofs_packet_expire_indirect_t expire_indirect;
Tao Baod7db5942015-01-28 10:07:51 -080079 autofs_packet_missing_direct_t missing_direct;
80 autofs_packet_expire_direct_t expire_direct;
Ben Cheng655a7c02013-10-16 16:09:24 -070081};
Christopher Ferris525ce912017-07-26 13:12:53 -070082enum {
83 AUTOFS_IOC_EXPIRE_MULTI_CMD = 0x66,
84 AUTOFS_IOC_PROTOSUBVER_CMD,
85 AUTOFS_IOC_ASKUMOUNT_CMD = 0x70,
86};
87#define AUTOFS_IOC_EXPIRE_MULTI _IOW(AUTOFS_IOCTL, AUTOFS_IOC_EXPIRE_MULTI_CMD, int)
Christopher Ferris525ce912017-07-26 13:12:53 -070088#define AUTOFS_IOC_PROTOSUBVER _IOR(AUTOFS_IOCTL, AUTOFS_IOC_PROTOSUBVER_CMD, int)
89#define AUTOFS_IOC_ASKUMOUNT _IOR(AUTOFS_IOCTL, AUTOFS_IOC_ASKUMOUNT_CMD, int)
Ben Cheng655a7c02013-10-16 16:09:24 -070090#endif