diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 20:34:10 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 20:34:10 -0400 |
| commit | a379f71a30dddbd2e7393624e455ce53c87965d1 (patch) | |
| tree | c9c71b3eb19ff7e8618ff29e9d5ac99882b823e1 /include/uapi/linux | |
| parent | de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 (diff) | |
| parent | 9c5d760b8d229b94c5030863a5edaee5f1a9d7b7 (diff) | |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
- a few block updates that fell in my lap
- lib/ updates
- checkpatch
- autofs
- ipc
- a ton of misc other things
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
mm: split gfp_mask and mapping flags into separate fields
fs: use mapping_set_error instead of opencoded set_bit
treewide: remove redundant #include <linux/kconfig.h>
hung_task: allow hung_task_panic when hung_task_warnings is 0
kthread: add kerneldoc for kthread_create()
kthread: better support freezable kthread workers
kthread: allow to modify delayed kthread work
kthread: allow to cancel kthread work
kthread: initial support for delayed kthread work
kthread: detect when a kthread work is used by more workers
kthread: add kthread_destroy_worker()
kthread: add kthread_create_worker*()
kthread: allow to call __kthread_create_on_node() with va_list args
kthread/smpboot: do not park in kthread_create_on_cpu()
kthread: kthread worker API cleanup
kthread: rename probe_kthread_data() to kthread_probe_data()
scripts/tags.sh: enable code completion in VIM
mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping
kdump, vmcoreinfo: report memory sections virtual addresses
ipc/sem.c: add cond_resched in exit_sme
...
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/auto_dev-ioctl.h | 221 | ||||
| -rw-r--r-- | include/uapi/linux/auto_fs.h | 1 |
2 files changed, 222 insertions, 0 deletions
diff --git a/include/uapi/linux/auto_dev-ioctl.h b/include/uapi/linux/auto_dev-ioctl.h new file mode 100644 index 000000000000..021ed331dd71 --- /dev/null +++ b/include/uapi/linux/auto_dev-ioctl.h | |||
| @@ -0,0 +1,221 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2008 Red Hat, Inc. All rights reserved. | ||
| 3 | * Copyright 2008 Ian Kent <raven@themaw.net> | ||
| 4 | * | ||
| 5 | * This file is part of the Linux kernel and is made available under | ||
| 6 | * the terms of the GNU General Public License, version 2, or at your | ||
| 7 | * option, any later version, incorporated herein by reference. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef _UAPI_LINUX_AUTO_DEV_IOCTL_H | ||
| 11 | #define _UAPI_LINUX_AUTO_DEV_IOCTL_H | ||
| 12 | |||
| 13 | #include <linux/auto_fs.h> | ||
| 14 | #include <linux/string.h> | ||
| 15 | |||
| 16 | #define AUTOFS_DEVICE_NAME "autofs" | ||
| 17 | |||
| 18 | #define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1 | ||
| 19 | #define AUTOFS_DEV_IOCTL_VERSION_MINOR 0 | ||
| 20 | |||
| 21 | #define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl) | ||
| 22 | |||
| 23 | /* | ||
| 24 | * An ioctl interface for autofs mount point control. | ||
| 25 | */ | ||
| 26 | |||
| 27 | struct args_protover { | ||
| 28 | __u32 version; | ||
| 29 | }; | ||
| 30 | |||
| 31 | struct args_protosubver { | ||
| 32 | __u32 sub_version; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct args_openmount { | ||
| 36 | __u32 devid; | ||
| 37 | }; | ||
| 38 | |||
| 39 | struct args_ready { | ||
| 40 | __u32 token; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct args_fail { | ||
| 44 | __u32 token; | ||
| 45 | __s32 status; | ||
| 46 | }; | ||
| 47 | |||
| 48 | struct args_setpipefd { | ||
| 49 | __s32 pipefd; | ||
| 50 | }; | ||
| 51 | |||
| 52 | struct args_timeout { | ||
| 53 | __u64 timeout; | ||
| 54 | }; | ||
| 55 | |||
| 56 | struct args_requester { | ||
| 57 | __u32 uid; | ||
| 58 | __u32 gid; | ||
| 59 | }; | ||
| 60 | |||
| 61 | struct args_expire { | ||
| 62 | __u32 how; | ||
| 63 | }; | ||
| 64 | |||
| 65 | struct args_askumount { | ||
| 66 | __u32 may_umount; | ||
| 67 | }; | ||
| 68 | |||
| 69 | struct args_ismountpoint { | ||
| 70 | union { | ||
| 71 | struct args_in { | ||
| 72 | __u32 type; | ||
| 73 | } in; | ||
| 74 | struct args_out { | ||
| 75 | __u32 devid; | ||
| 76 | __u32 magic; | ||
| 77 | } out; | ||
| 78 | }; | ||
| 79 | }; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * All the ioctls use this structure. | ||
| 83 | * When sending a path size must account for the total length | ||
| 84 | * of the chunk of memory otherwise is is the size of the | ||
| 85 | * structure. | ||
| 86 | */ | ||
| 87 | |||
| 88 | struct autofs_dev_ioctl { | ||
| 89 | __u32 ver_major; | ||
| 90 | __u32 ver_minor; | ||
| 91 | __u32 size; /* total size of data passed in | ||
| 92 | * including this struct */ | ||
| 93 | __s32 ioctlfd; /* automount command fd */ | ||
| 94 | |||
| 95 | /* Command parameters */ | ||
| 96 | |||
| 97 | union { | ||
| 98 | struct args_protover protover; | ||
| 99 | struct args_protosubver protosubver; | ||
| 100 | struct args_openmount openmount; | ||
| 101 | struct args_ready ready; | ||
| 102 | struct args_fail fail; | ||
| 103 | struct args_setpipefd setpipefd; | ||
| 104 | struct args_timeout timeout; | ||
| 105 | struct args_requester requester; | ||
| 106 | struct args_expire expire; | ||
| 107 | struct args_askumount askumount; | ||
| 108 | struct args_ismountpoint ismountpoint; | ||
| 109 | }; | ||
| 110 | |||
| 111 | char path[0]; | ||
| 112 | }; | ||
| 113 | |||
| 114 | static inline void init_autofs_dev_ioctl(struct autofs_dev_ioctl *in) | ||
| 115 | { | ||
| 116 | memset(in, 0, sizeof(struct autofs_dev_ioctl)); | ||
| 117 | in->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; | ||
| 118 | in->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; | ||
| 119 | in->size = sizeof(struct autofs_dev_ioctl); | ||
| 120 | in->ioctlfd = -1; | ||
| 121 | } | ||
| 122 | |||
| 123 | /* | ||
| 124 | * If you change this make sure you make the corresponding change | ||
| 125 | * to autofs-dev-ioctl.c:lookup_ioctl() | ||
| 126 | */ | ||
| 127 | enum { | ||
| 128 | /* Get various version info */ | ||
| 129 | AUTOFS_DEV_IOCTL_VERSION_CMD = 0x71, | ||
| 130 | AUTOFS_DEV_IOCTL_PROTOVER_CMD, | ||
| 131 | AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, | ||
| 132 | |||
| 133 | /* Open mount ioctl fd */ | ||
| 134 | AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, | ||
| 135 | |||
| 136 | /* Close mount ioctl fd */ | ||
| 137 | AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, | ||
| 138 | |||
| 139 | /* Mount/expire status returns */ | ||
| 140 | AUTOFS_DEV_IOCTL_READY_CMD, | ||
| 141 | AUTOFS_DEV_IOCTL_FAIL_CMD, | ||
| 142 | |||
| 143 | /* Activate/deactivate autofs mount */ | ||
| 144 | AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, | ||
| 145 | AUTOFS_DEV_IOCTL_CATATONIC_CMD, | ||
| 146 | |||
| 147 | /* Expiry timeout */ | ||
| 148 | AUTOFS_DEV_IOCTL_TIMEOUT_CMD, | ||
| 149 | |||
| 150 | /* Get mount last requesting uid and gid */ | ||
| 151 | AUTOFS_DEV_IOCTL_REQUESTER_CMD, | ||
| 152 | |||
| 153 | /* Check for eligible expire candidates */ | ||
| 154 | AUTOFS_DEV_IOCTL_EXPIRE_CMD, | ||
| 155 | |||
| 156 | /* Request busy status */ | ||
| 157 | AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, | ||
| 158 | |||
| 159 | /* Check if path is a mountpoint */ | ||
| 160 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, | ||
| 161 | }; | ||
| 162 | |||
| 163 | #define AUTOFS_IOCTL 0x93 | ||
| 164 | |||
| 165 | #define AUTOFS_DEV_IOCTL_VERSION \ | ||
| 166 | _IOWR(AUTOFS_IOCTL, \ | ||
| 167 | AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl) | ||
| 168 | |||
| 169 | #define AUTOFS_DEV_IOCTL_PROTOVER \ | ||
| 170 | _IOWR(AUTOFS_IOCTL, \ | ||
| 171 | AUTOFS_DEV_IOCTL_PROTOVER_CMD, struct autofs_dev_ioctl) | ||
| 172 | |||
| 173 | #define AUTOFS_DEV_IOCTL_PROTOSUBVER \ | ||
| 174 | _IOWR(AUTOFS_IOCTL, \ | ||
| 175 | AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, struct autofs_dev_ioctl) | ||
| 176 | |||
| 177 | #define AUTOFS_DEV_IOCTL_OPENMOUNT \ | ||
| 178 | _IOWR(AUTOFS_IOCTL, \ | ||
| 179 | AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, struct autofs_dev_ioctl) | ||
| 180 | |||
| 181 | #define AUTOFS_DEV_IOCTL_CLOSEMOUNT \ | ||
| 182 | _IOWR(AUTOFS_IOCTL, \ | ||
| 183 | AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, struct autofs_dev_ioctl) | ||
| 184 | |||
| 185 | #define AUTOFS_DEV_IOCTL_READY \ | ||
| 186 | _IOWR(AUTOFS_IOCTL, \ | ||
| 187 | AUTOFS_DEV_IOCTL_READY_CMD, struct autofs_dev_ioctl) | ||
| 188 | |||
| 189 | #define AUTOFS_DEV_IOCTL_FAIL \ | ||
| 190 | _IOWR(AUTOFS_IOCTL, \ | ||
| 191 | AUTOFS_DEV_IOCTL_FAIL_CMD, struct autofs_dev_ioctl) | ||
| 192 | |||
| 193 | #define AUTOFS_DEV_IOCTL_SETPIPEFD \ | ||
| 194 | _IOWR(AUTOFS_IOCTL, \ | ||
| 195 | AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, struct autofs_dev_ioctl) | ||
| 196 | |||
| 197 | #define AUTOFS_DEV_IOCTL_CATATONIC \ | ||
| 198 | _IOWR(AUTOFS_IOCTL, \ | ||
| 199 | AUTOFS_DEV_IOCTL_CATATONIC_CMD, struct autofs_dev_ioctl) | ||
| 200 | |||
| 201 | #define AUTOFS_DEV_IOCTL_TIMEOUT \ | ||
| 202 | _IOWR(AUTOFS_IOCTL, \ | ||
| 203 | AUTOFS_DEV_IOCTL_TIMEOUT_CMD, struct autofs_dev_ioctl) | ||
| 204 | |||
| 205 | #define AUTOFS_DEV_IOCTL_REQUESTER \ | ||
| 206 | _IOWR(AUTOFS_IOCTL, \ | ||
| 207 | AUTOFS_DEV_IOCTL_REQUESTER_CMD, struct autofs_dev_ioctl) | ||
| 208 | |||
| 209 | #define AUTOFS_DEV_IOCTL_EXPIRE \ | ||
| 210 | _IOWR(AUTOFS_IOCTL, \ | ||
| 211 | AUTOFS_DEV_IOCTL_EXPIRE_CMD, struct autofs_dev_ioctl) | ||
| 212 | |||
| 213 | #define AUTOFS_DEV_IOCTL_ASKUMOUNT \ | ||
| 214 | _IOWR(AUTOFS_IOCTL, \ | ||
| 215 | AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, struct autofs_dev_ioctl) | ||
| 216 | |||
| 217 | #define AUTOFS_DEV_IOCTL_ISMOUNTPOINT \ | ||
| 218 | _IOWR(AUTOFS_IOCTL, \ | ||
| 219 | AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, struct autofs_dev_ioctl) | ||
| 220 | |||
| 221 | #endif /* _UAPI_LINUX_AUTO_DEV_IOCTL_H */ | ||
diff --git a/include/uapi/linux/auto_fs.h b/include/uapi/linux/auto_fs.h index 9175a1b4dc69..1bfc3ed8b284 100644 --- a/include/uapi/linux/auto_fs.h +++ b/include/uapi/linux/auto_fs.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #define _UAPI_LINUX_AUTO_FS_H | 12 | #define _UAPI_LINUX_AUTO_FS_H |
| 13 | 13 | ||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/limits.h> | ||
| 15 | #ifndef __KERNEL__ | 16 | #ifndef __KERNEL__ |
| 16 | #include <sys/ioctl.h> | 17 | #include <sys/ioctl.h> |
| 17 | #endif /* __KERNEL__ */ | 18 | #endif /* __KERNEL__ */ |
