master
h 52 lines 1.89 KB
Raw
1 /*
2 * FreeBSD disk.h definitions for ioctl(2) emulation
3 *
4 * Copyright (c) 2015 Stacey D. Son
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 #ifndef OS_IOCTL_DISK_H
9 #define OS_IOCTL_DISK_H
10
11 /* See sys/disk.h */
12
13 #define TARGET_MAXPATHLEN 1024
14
15 #define TARGET_DIOCGSECTORSIZE TARGET_IOR('d', 128, uint32_t)
16 #define TARGET_DIOCGMEDIASIZE TARGET_IOR('d', 129, int64_t)
17 #define TARGET_DIOCGFWSECTORS TARGET_IOR('d', 130, uint32_t)
18 #define TARGET_DIOCGFWHEADS TARGET_IOR('d', 131, uint32_t)
19 #define TARGET_DIOCGFLUSH TARGET_IO('d', 135)
20 #define TARGET_DIOCGDELETE TARGET_IOW('d', 136, int64_t[2])
21 #define TARGET_DISK_IDENT_SIZE 256
22 #define TARGET_DIOCGIDENT TARGET_IOR('d', 137, \
23 char[TARGET_DISK_IDENT_SIZE])
24 #define TARGET_DIOCGPROVIDERNAME TARGET_IOR('d', 138, \
25 char[TARGET_MAXPATHLEN])
26 #define TARGET_DIOCGSTRIPESIZE TARGET_IOR('d', 139, int64_t)
27 #define TARGET_DIOCGSTRIPEOFFSET TARGET_IOR('d', 140, int64_t)
28 #define TARGET_DIOCGPHYSPATH TARGET_IOR('d', 141, \
29 char[TARGET_MAXPATHLEN])
30
31 struct target_diocgattr_arg {
32 char name[64];
33 abi_int len;
34 union {
35 char str[TARGET_DISK_IDENT_SIZE];
36 int64_t off; /* Want abioff, but this will do */
37 abi_int i;
38 abi_short u16;
39 } value;
40 };
41
42 #define TARGET_DIOCGATTR TARGET_IOWR('d', 142, struct target_diocgattr_arg)
43
44 /* Unsupported, target_disk_zone_args is complicated */
45 /* #define DIOCZONECMD _IOWR('d', 143, struct target_disk_zone_args) */
46
47 /* Enable/Disable the device for kernel core dumps. */
48 /* #define DIOCSKERNELDUMP _IOW('d', 145, struct diocskerneldump_arg) */
49 /* Get current kernel netdump configuration details for a given index. */
50 /* #define DIOCGKERNELDUMP _IOWR('d', 146, struct diocskerneldump_arg) */
51
52 #endif /* OS_IOCTL_DISK_H */