]> sourceware.org Git - lvm2.git/commitdiff
Remove init_verbose() calls immediately after create_toolcontext() calls.
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:30:19 +0000 (03:30 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:30:19 +0000 (03:30 +0000)
The rationale for removing init_verbose() call is very similar to removing
init_debug() call.  create_toolcontext() calls _init_logging() which
makes these calls:
        /* Verbose level for tty output */
        cmd->default_settings.verbose =
            find_config_tree_int(cmd, "log/verbose", DEFAULT_VERBOSE);
        init_verbose(cmd->default_settings.verbose + VERBOSE_BASE_LEVEL);

And being that create_toolcontext() copies default_settings into
current_settings at the bottom, the init_verbose() call we are removing:
        init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);

is redundant.

daemons/clvmd/lvm-functions.c
tools/lvmcmdline.c

index 1a7b1983f70bd05927d0b46058fa6115007ca873..9da99dd7ce02303e8e45399bb1a31a5393263b06 100644 (file)
@@ -732,7 +732,6 @@ int init_lvm(int using_gulm)
        /* Use LOG_DAEMON for syslog messages instead of LOG_USER */
        init_syslog(LOG_DAEMON);
        openlog("clvmd", LOG_PID, LOG_DAEMON);
-       init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);
        set_activation(cmd->current_settings.activation);
        archive_enable(cmd, cmd->current_settings.archive);
        backup_enable(cmd, cmd->current_settings.backup);
index fdffed3e6fec7435ecfaac4035c7f766f937a411..9fcf6fee86c4d837bea57081d56181ad62d2c1a9 100644 (file)
@@ -1091,7 +1091,6 @@ struct cmd_context *init_lvm(unsigned is_static)
        if (!(cmd = create_toolcontext(_cmdline.the_args, is_static, 0)))
                return_NULL;
 
-       init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);
        init_test(cmd->current_settings.test);
        init_full_scan_done(0);
        init_mirror_in_sync(0);
This page took 0.043452 seconds and 5 git commands to generate.