1 #include <linux/ioctl.h>
2 #include <linux/loop.h>
7 /* Intentionally mix the loop and loop-control ioctls. */
8 static const struct ioctl loop_ioctls
[] = {
11 IOCTL(LOOP_SET_STATUS
),
12 IOCTL(LOOP_GET_STATUS
),
13 IOCTL(LOOP_SET_STATUS64
),
14 IOCTL(LOOP_GET_STATUS64
),
15 IOCTL(LOOP_CHANGE_FD
),
16 IOCTL(LOOP_SET_CAPACITY
),
21 #ifdef LOOP_CTL_REMOVE
22 IOCTL(LOOP_CTL_REMOVE
),
24 #ifdef LOOP_CTL_GET_FREE
25 IOCTL(LOOP_CTL_GET_FREE
),
29 static const char *const loop_ctrl_devs
[] = {
31 //FIXME: Need to glob /dev/loop*
34 static const struct ioctl_group loop_ctrl_grp
= {
36 .devs
= loop_ctrl_devs
,
37 .devs_cnt
= ARRAY_SIZE(loop_ctrl_devs
),
38 .sanitise
= pick_random_ioctl
,
39 .ioctls
= loop_ioctls
,
40 .ioctls_cnt
= ARRAY_SIZE(loop_ioctls
),
43 REG_IOCTL_GROUP(loop_ctrl_grp
)
45 static const char *const loop_devs
[] = {
49 static const struct ioctl_group loop_grp
= {
52 .devs_cnt
= ARRAY_SIZE(loop_devs
),
53 .sanitise
= pick_random_ioctl
,
54 .ioctls
= loop_ioctls
,
55 .ioctls_cnt
= ARRAY_SIZE(loop_ioctls
),
58 REG_IOCTL_GROUP(loop_grp
)