mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-20 11:33:15 +03:00
Move init_test() from _apply_settings into _init_logging().
This one we actually need to move. _init_logging() is called from create_toolcontext(), which makes this call: /* Test mode */ cmd->default_settings.test = find_config_tree_int(cmd, "global/test", 0); But it does not call init_test(). So we need an init_test() somewhere. The most logical place is to put it inside _init_logging(), since this is where the config value is read and default_settings are set. Placing the init_test() call here matches what is done with other variables and seems to make sense.
This commit is contained in:
@@ -162,6 +162,7 @@ static void _init_logging(struct cmd_context *cmd)
|
||||
/* Test mode */
|
||||
cmd->default_settings.test =
|
||||
find_config_tree_int(cmd, "global/test", 0);
|
||||
init_test(cmd->default_settings.test);
|
||||
|
||||
/* Settings for logging to file */
|
||||
if (find_config_tree_int(cmd, "log/overwrite", DEFAULT_OVERWRITE))
|
||||
|
Reference in New Issue
Block a user