diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index dc7abb389..5800154f3 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -87,8 +87,6 @@ static int _version_checked = 0; static int _version_ok = 1; static unsigned _ioctl_buffer_double_factor = 0; -const int _dm_compat = 0; - /* *INDENT-OFF* */ static const struct cmd_data _cmd_data_v4[] = { {"create", DM_DEV_CREATE, {4, 0, 0}}, @@ -597,23 +595,9 @@ int dm_check_version(void) _version_checked = 1; - if (_check_version(dmversion, sizeof(dmversion), _dm_compat)) + if (_check_version(dmversion, sizeof(dmversion), 0)) return 1; - if (!_dm_compat) - goto_bad; - - log_verbose("device-mapper ioctl protocol version %u failed. " - "Trying protocol version 1.", _dm_version); - _dm_version = 1; - if (_check_version(dmversion, sizeof(dmversion), 0)) { - log_verbose("Using device-mapper ioctl protocol version 1"); - return 1; - } - - compat = "(compat)"; - - bad: dm_get_library_version(libversion, sizeof(libversion)); log_error("Incompatible libdevmapper %s%s and kernel driver %s.", diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 5bb385366..a579578c9 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -86,8 +86,6 @@ static int _version_checked = 0; static int _version_ok = 1; static unsigned _ioctl_buffer_double_factor = 0; -const int _dm_compat = 0; - /* *INDENT-OFF* */ static const struct cmd_data _cmd_data_v4[] = { {"create", DM_DEV_CREATE, {4, 0, 0}}, @@ -590,23 +588,9 @@ int dm_check_version(void) _version_checked = 1; - if (_check_version(dmversion, sizeof(dmversion), _dm_compat)) + if (_check_version(dmversion, sizeof(dmversion), 0)) return 1; - if (!_dm_compat) - goto_bad; - - log_verbose("device-mapper ioctl protocol version %u failed. " - "Trying protocol version 1.", _dm_version); - _dm_version = 1; - if (_check_version(dmversion, sizeof(dmversion), 0)) { - log_verbose("Using device-mapper ioctl protocol version 1"); - return 1; - } - - compat = "(compat)"; - - bad: dm_get_library_version(libversion, sizeof(libversion)); log_error("Incompatible libdevmapper %s%s and kernel driver %s.",