1/****************************************************************************
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_DM_IOCTL_V4_H
20#define _LINUX_DM_IOCTL_V4_H
21#include <linux/types.h>
22#define DM_DIR "mapper"
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define DM_MAX_TYPE_NAME 16
25#define DM_NAME_LEN 128
26#define DM_UUID_LEN 129
27struct dm_ioctl {
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 uint32_t version[3];
30 uint32_t data_size;
31 uint32_t data_start;
32 uint32_t target_count;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 int32_t open_count;
35 uint32_t flags;
36 uint32_t event_nr;
37 uint32_t padding;
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 uint64_t dev;
40 char name[DM_NAME_LEN];
41 char uuid[DM_UUID_LEN];
42 char data[7];
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44};
45struct dm_target_spec {
46 uint64_t sector_start;
47 uint64_t length;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 int32_t status;
50 uint32_t next;
51 char target_type[DM_MAX_TYPE_NAME];
52};
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54struct dm_target_deps {
55 uint32_t count;
56 uint32_t padding;
57 uint64_t dev[0];
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59};
60struct dm_name_list {
61 uint64_t dev;
62 uint32_t next;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 char name[0];
65};
66struct dm_target_versions {
67 uint32_t next;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 uint32_t version[3];
70 char name[0];
71};
72struct dm_target_msg {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 uint64_t sector;
75 char message[0];
76};
77enum {
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 DM_VERSION_CMD = 0,
80 DM_REMOVE_ALL_CMD,
81 DM_LIST_DEVICES_CMD,
82 DM_DEV_CREATE_CMD,
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 DM_DEV_REMOVE_CMD,
85 DM_DEV_RENAME_CMD,
86 DM_DEV_SUSPEND_CMD,
87 DM_DEV_STATUS_CMD,
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 DM_DEV_WAIT_CMD,
90 DM_TABLE_LOAD_CMD,
91 DM_TABLE_CLEAR_CMD,
92 DM_TABLE_DEPS_CMD,
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 DM_TABLE_STATUS_CMD,
95 DM_LIST_VERSIONS_CMD,
96 DM_TARGET_MSG_CMD,
97 DM_DEV_SET_GEOMETRY_CMD
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99};
100#define DM_IOCTL 0xfd
101#define DM_VERSION _IOWR(DM_IOCTL, DM_VERSION_CMD, struct dm_ioctl)
102#define DM_REMOVE_ALL _IOWR(DM_IOCTL, DM_REMOVE_ALL_CMD, struct dm_ioctl)
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104#define DM_LIST_DEVICES _IOWR(DM_IOCTL, DM_LIST_DEVICES_CMD, struct dm_ioctl)
105#define DM_DEV_CREATE _IOWR(DM_IOCTL, DM_DEV_CREATE_CMD, struct dm_ioctl)
106#define DM_DEV_REMOVE _IOWR(DM_IOCTL, DM_DEV_REMOVE_CMD, struct dm_ioctl)
107#define DM_DEV_RENAME _IOWR(DM_IOCTL, DM_DEV_RENAME_CMD, struct dm_ioctl)
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109#define DM_DEV_SUSPEND _IOWR(DM_IOCTL, DM_DEV_SUSPEND_CMD, struct dm_ioctl)
110#define DM_DEV_STATUS _IOWR(DM_IOCTL, DM_DEV_STATUS_CMD, struct dm_ioctl)
111#define DM_DEV_WAIT _IOWR(DM_IOCTL, DM_DEV_WAIT_CMD, struct dm_ioctl)
112#define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl)
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define DM_TABLE_CLEAR _IOWR(DM_IOCTL, DM_TABLE_CLEAR_CMD, struct dm_ioctl)
115#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
116#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
117#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119#define DM_TARGET_MSG _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
120#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
121#define DM_VERSION_MAJOR 4
122#define DM_VERSION_MINOR 14
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124#define DM_VERSION_PATCHLEVEL 0
125#define DM_VERSION_EXTRA "-ioctl (2008-04-23)"
126#define DM_READONLY_FLAG (1 << 0)
127#define DM_SUSPEND_FLAG (1 << 1)
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129#define DM_PERSISTENT_DEV_FLAG (1 << 3)
130#define DM_STATUS_TABLE_FLAG (1 << 4)
131#define DM_ACTIVE_PRESENT_FLAG (1 << 5)
132#define DM_INACTIVE_PRESENT_FLAG (1 << 6)
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134#define DM_BUFFER_FULL_FLAG (1 << 8)
135#define DM_SKIP_BDGET_FLAG (1 << 9)
136#define DM_SKIP_LOCKFS_FLAG (1 << 10)
137#define DM_NOFLUSH_FLAG (1 << 11)
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139#endif
140