1655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng/****************************************************************************
2655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
3655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
4655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   This header was automatically generated from a Linux kernel header
5655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   of the same name, to make information necessary for userspace to
6655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   call into the kernel available to libc.  It contains only constants,
7655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   structures, and macros generated from the original header, and thus,
8655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   contains no copyrightable information.
9655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
10655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   To edit the content of this header, modify the corresponding
11655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   run bionic/libc/kernel/tools/update_all.py
13655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
14655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   Any manual change here will be lost the next time this script will
15655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***   be run. You've been warned!
16655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ***
17655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************
18655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng ****************************************************************************/
19655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#ifndef _LINUX_AUTO_FS4_H
20655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define _LINUX_AUTO_FS4_H
21655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/types.h>
22655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#include <linux/auto_fs.h>
23655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#undef AUTOFS_PROTO_VERSION
24655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#undef AUTOFS_MIN_PROTO_VERSION
25655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#undef AUTOFS_MAX_PROTO_VERSION
26655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_PROTO_VERSION 5
27655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_MIN_PROTO_VERSION 3
28655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_MAX_PROTO_VERSION 5
29655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_PROTO_SUBVERSION 2
30655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_EXP_IMMEDIATE 1
31655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_EXP_LEAVES 2
32655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_TYPE_ANY 0U
33655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_TYPE_INDIRECT 1U
34655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_TYPE_DIRECT 2U
35655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_TYPE_OFFSET 4U
36655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengenum autofs_notify {
37d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  NFY_NONE,
38d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  NFY_MOUNT,
39d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  NFY_EXPIRE
40655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
41655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define autofs_ptype_expire_multi 2
42655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define autofs_ptype_missing_indirect 3
43655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define autofs_ptype_expire_indirect 4
44655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define autofs_ptype_missing_direct 5
45655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define autofs_ptype_expire_direct 6
46655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct autofs_packet_expire_multi {
47d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_hdr hdr;
48d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_wqt_t wait_queue_token;
49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int len;
50d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char name[NAME_MAX + 1];
51655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
52655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengunion autofs_packet_union {
53d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_hdr hdr;
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_missing missing;
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_expire expire;
56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_expire_multi expire_multi;
57655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
58655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengstruct autofs_v5_packet {
59d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_hdr hdr;
60d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_wqt_t wait_queue_token;
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 dev;
62d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u64 ino;
63d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 uid;
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 gid;
65d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 pid;
66d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 tgid;
67d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 len;
68d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char name[NAME_MAX + 1];
69655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
70655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef struct autofs_v5_packet autofs_packet_missing_indirect_t;
71655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef struct autofs_v5_packet autofs_packet_expire_indirect_t;
72655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef struct autofs_v5_packet autofs_packet_missing_direct_t;
73655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengtypedef struct autofs_v5_packet autofs_packet_expire_direct_t;
74655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Chengunion autofs_v5_packet_union {
75d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_packet_hdr hdr;
76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct autofs_v5_packet v5_packet;
77d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_packet_missing_indirect_t missing_indirect;
78d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_packet_expire_indirect_t expire_indirect;
79d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_packet_missing_direct_t missing_direct;
80d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  autofs_packet_expire_direct_t expire_direct;
81655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng};
82d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93, 0x66, int)
83655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI
84655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI
85d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define AUTOFS_IOC_PROTOSUBVER _IOR(0x93, 0x67, int)
86d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define AUTOFS_IOC_ASKUMOUNT _IOR(0x93, 0x70, int)
87655a7c081f83b8351ed5f11a6c6accd9458293a8Ben Cheng#endif
88