mirror of
git://sourceware.org/git/lvm2.git
synced 2024-11-04 22:22:07 +03:00
libdm: always dm_lib_init mangling mode
If there ever would be a second call to dm_lib_init() and envvar would be improperly set, some last set value would be used while it should reset to default mangling mode.
This commit is contained in:
parent
bd2500e62e
commit
f0003d3be5
@ -1,5 +1,6 @@
|
||||
Version 1.02.85 -
|
||||
===================================
|
||||
Always reinitialize _name_mangling_mode in dm_lib_init().
|
||||
Add tracking flag about implicitly added devices into dm_tree.
|
||||
Stop timeout thread immediately when the last worker thread is finished.
|
||||
Fix dmeventd logging with parallel wait event processing.
|
||||
|
@ -91,16 +91,15 @@ void dm_lib_init(void)
|
||||
if (getenv("DM_DISABLE_UDEV"))
|
||||
_udev_disabled = 1;
|
||||
|
||||
env = getenv(DM_DEFAULT_NAME_MANGLING_MODE_ENV_VAR_NAME);
|
||||
if (env && *env) {
|
||||
_name_mangling_mode = DEFAULT_DM_NAME_MANGLING;
|
||||
if ((env = getenv(DM_DEFAULT_NAME_MANGLING_MODE_ENV_VAR_NAME))) {
|
||||
if (!strcasecmp(env, "none"))
|
||||
_name_mangling_mode = DM_STRING_MANGLING_NONE;
|
||||
else if (!strcasecmp(env, "auto"))
|
||||
_name_mangling_mode = DM_STRING_MANGLING_AUTO;
|
||||
else if (!strcasecmp(env, "hex"))
|
||||
_name_mangling_mode = DM_STRING_MANGLING_HEX;
|
||||
} else
|
||||
_name_mangling_mode = DEFAULT_DM_NAME_MANGLING;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user