1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cleanup: detect dmeventd_executable just once

Avoid repeating debug messages about dmeventd executable
and just remember it once for whole cmd lifetime.
This commit is contained in:
Zdenek Kabelac 2018-02-09 23:38:02 +01:00
parent 4f278324c7
commit 12fba201be
2 changed files with 5 additions and 1 deletions

View File

@ -1662,7 +1662,10 @@ static struct dm_event_handler *_create_dm_event_handler(struct cmd_context *cmd
if (!(dmevh = dm_event_handler_create()))
return_NULL;
if (dm_event_handler_set_dmeventd_path(dmevh, find_config_tree_str(cmd, dmeventd_executable_CFG, NULL)))
if (!cmd->default_settings.dmeventd_executable)
cmd->default_settings.dmeventd_executable = find_config_tree_str(cmd, dmeventd_executable_CFG, NULL);
if (dm_event_handler_set_dmeventd_path(dmevh, cmd->default_settings.dmeventd_executable))
goto_bad;
if (dso && dm_event_handler_set_dso(dmevh, dso))

View File

@ -42,6 +42,7 @@ struct config_info {
int cache_vgmetadata;
const char *msg_prefix;
const char *fmt_name;
const char *dmeventd_executable;
uint64_t unit_factor;
int cmd_name; /* Show command name? */
mode_t umask;