* dm.c: Add check whether DM_VERSION_MAJOR equals to 4, provide empty dm_ioctl if check fails. --- dm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dm.c b/dm.c index ebdfc44..79bb7c7 100644 --- a/dm.c +++ b/dm.c @@ -5,6 +5,8 @@ # include <sys/ioctl.h> # include <linux/dm-ioctl.h> +# if DM_VERSION_MAJOR == 4 + static void dm_decode_device(const unsigned int code, const struct dm_ioctl *ioc) { @@ -375,4 +377,13 @@ dm_ioctl(struct tcb *tcp, const unsigned int code, long arg) } } -#endif +# else /* !(DM_VERSION_MAJOR == 4) */ + +int +dm_ioctl(struct tcb *tcp, const unsigned int code, long arg) +{ + return 0; +} + +# endif /* DM_VERSION_MAJOR == 4 */ +#endif /* HAVE_LINUX_DM_IOCTL_H */ -- 1.7.10.4 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel