dm: add support for DM_DEV_ARM_POLL
Added in Linux commit v4.13-rc1~137^2~14. * dm.c [!DM_LIST_VERSIONS] (DM_LIST_VERSIONS): Add leading zero. [!DM_TARGET_MSG] (DM_TARGET_MSG): Likewise. [!DM_DEV_SET_GEOMETRY_CMD] (DM_DEV_SET_GEOMETRY_CMD): Likewise. [!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro. (dm_ioctl_has_params, dm_ioctl): Handle DM_DEV_ARM_POLL. * tests/ioctl_dm.c [!DM_DEV_ARM_POLL] (DM_DEV_ARM_POLL): New macro. (main) <dummy_check_cmds>: Add DM_DEV_ARM_POLL.
This commit is contained in:
parent
6eb263c72c
commit
6769418d51
11
dm.c
11
dm.c
@ -44,13 +44,16 @@
|
||||
/* Definitions for command which have been added later */
|
||||
|
||||
# ifndef DM_LIST_VERSIONS
|
||||
# define DM_LIST_VERSIONS _IOWR(DM_IOCTL, 0xd, struct dm_ioctl)
|
||||
# define DM_LIST_VERSIONS _IOWR(DM_IOCTL, 0x0d, struct dm_ioctl)
|
||||
# endif
|
||||
# ifndef DM_TARGET_MSG
|
||||
# define DM_TARGET_MSG _IOWR(DM_IOCTL, 0xe, struct dm_ioctl)
|
||||
# define DM_TARGET_MSG _IOWR(DM_IOCTL, 0x0e, struct dm_ioctl)
|
||||
# endif
|
||||
# ifndef DM_DEV_SET_GEOMETRY
|
||||
# define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, 0xf, struct dm_ioctl)
|
||||
# define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, 0x0f, struct dm_ioctl)
|
||||
# endif
|
||||
# ifndef DM_DEV_ARM_POLL
|
||||
# define DM_DEV_ARM_POLL _IOWR(DM_IOCTL, 0x10, struct dm_ioctl)
|
||||
# endif
|
||||
|
||||
|
||||
@ -429,6 +432,7 @@ dm_ioctl_has_params(const unsigned int code)
|
||||
case DM_DEV_SUSPEND:
|
||||
case DM_DEV_STATUS:
|
||||
case DM_TABLE_CLEAR:
|
||||
case DM_DEV_ARM_POLL:
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -576,6 +580,7 @@ dm_ioctl(struct tcb *const tcp, const unsigned int code, const kernel_ulong_t ar
|
||||
case DM_LIST_VERSIONS:
|
||||
case DM_TARGET_MSG:
|
||||
case DM_DEV_SET_GEOMETRY:
|
||||
case DM_DEV_ARM_POLL:
|
||||
return dm_known_ioctl(tcp, code, arg);
|
||||
default:
|
||||
return RVAL_DECODED;
|
||||
|
@ -54,6 +54,10 @@
|
||||
# define ALIGNED_OFFSET(t_, m_) \
|
||||
ALIGNED_SIZE(offsetof(t_, m_), t_)
|
||||
|
||||
# ifndef DM_DEV_ARM_POLL
|
||||
# define DM_DEV_ARM_POLL _IOWR(DM_IOCTL, 0x10, struct dm_ioctl)
|
||||
# endif
|
||||
|
||||
static const char str129[] = STR32 STR32 STR32 STR32 "6";
|
||||
|
||||
static const __u64 dts_sector_base = (__u64) 0xdeadca75facef157ULL;
|
||||
@ -182,6 +186,7 @@ main(void)
|
||||
{ ARG_STR(DM_TABLE_CLEAR), false },
|
||||
{ ARG_STR(DM_TABLE_DEPS), true },
|
||||
{ ARG_STR(DM_TABLE_STATUS), true },
|
||||
{ ARG_STR(DM_DEV_ARM_POLL), false },
|
||||
};
|
||||
|
||||
struct dm_ioctl *unaligned_dm_arg =
|
||||
|
Loading…
x
Reference in New Issue
Block a user