mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-03 17:50:03 +03:00
cleanup: remove unuable code path
Eliminate some ancient unreachable code for historical version of libdm.
This commit is contained in:
parent
ffdceeb982
commit
d25c43c8cd
@ -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.",
|
||||
|
@ -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.",
|
||||
|
Loading…
Reference in New Issue
Block a user