diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index 533bb9eea..925f18c6b 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -616,8 +616,7 @@ int dm_check_version(void) int dm_cookie_supported(void) { return (dm_check_version() && - _dm_version >= 4 && - _dm_version_minor >= 15); + ((_dm_version == 4) ? _dm_version_minor >= 15 : _dm_version > 4)); } static int _dm_inactive_supported(void) @@ -1441,8 +1440,7 @@ static int _udev_complete(struct dm_task *dmt) static int _check_uevent_generated(struct dm_ioctl *dmi) { if (!dm_check_version() || - _dm_version < 4 || - _dm_version_minor < 17) + ((_dm_version == 4) ? _dm_version_minor < 17 : _dm_version < 4)) /* can't check, assume uevent is generated */ return 1; diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 28589a15c..a3a1bdc66 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -609,8 +609,7 @@ int dm_check_version(void) int dm_cookie_supported(void) { return (dm_check_version() && - _dm_version >= 4 && - _dm_version_minor >= 15); + ((_dm_version == 4) ? _dm_version_minor >= 15 : _dm_version > 4)); } static int _dm_inactive_supported(void) @@ -1436,8 +1435,7 @@ static int _udev_complete(struct dm_task *dmt) static int _check_uevent_generated(struct dm_ioctl *dmi) { if (!dm_check_version() || - _dm_version < 4 || - _dm_version_minor < 17) + ((_dm_version == 4) ? _dm_version_minor < 17 : _dm_version < 4)) /* can't check, assume uevent is generated */ return 1;