master - libdm: always dm_lib_init mangling mode
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0003d3be5b002aa27de978ad95fb2b310ca6529 Commit: f0003d3be5b002aa27de978ad95fb2b310ca6529 Parent: bd2500e62ea66984d4c3669a4429afa459165178 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Apr 4 21:24:41 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Apr 8 11:00:12 2014 +0200
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.
--- WHATS_NEW_DM | 1 + libdm/libdm-common.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-)
WHATS_NEW_DM +1 -0
@@ -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.
libdm/libdm-common.c +3 -4
@@ -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 ; + } }/*