All of lore.kernel.org
 help / color / mirror / Atom feed
From: wysochanski@sourceware.org <wysochanski@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 daemons/clvmd/lvm-functions.c tools/lvmcm ...
Date: 11 Dec 2008 03:29:37 -0000	[thread overview]
Message-ID: <20081211032937.19674.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski at sourceware.org	2008-12-11 03:29:37

Modified files:
	daemons/clvmd  : lvm-functions.c 
	tools          : lvmcmdline.c 

Log message:
	Remove init_debug() calls immediately after create_toolcontext() call.
	
	We can safely remove because create_toolcontext() calls _init_logging(),
	which makes these calls:
	/* Debug level for log file output */
	cmd->default_settings.debug =
	find_config_tree_int(cmd, "log/level", DEFAULT_LOGLEVEL);
	init_debug(cmd->default_settings.debug);
	
	Then at the bottom of create_toolcontext() we do this:
	cmd->current_settings = cmd->default_settings;
	
	So the call we are removing from init_lvm() functions (clvmd and lvmcmdline):
	init_debug(cmd->current_settings.debug);
	
	Just sets the value of debug based on 'cmd->current_settings.debug'.
	Since cmd->current_settings is equivalent to cmd->default_settings, and
	init_debug() was called with cmd->default_settings, the call we remove is
	redundant.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78

--- LVM2/daemons/clvmd/lvm-functions.c	2008/11/04 16:41:47	1.48
+++ LVM2/daemons/clvmd/lvm-functions.c	2008/12/11 03:29:37	1.49
@@ -732,7 +732,6 @@
 	/* Use LOG_DAEMON for syslog messages instead of LOG_USER */
 	init_syslog(LOG_DAEMON);
 	openlog("clvmd", LOG_PID, LOG_DAEMON);
-	init_debug(cmd->current_settings.debug);
 	init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);
 	set_activation(cmd->current_settings.activation);
 	archive_enable(cmd, cmd->current_settings.archive);
--- LVM2/tools/lvmcmdline.c	2008/12/11 03:28:54	1.77
+++ LVM2/tools/lvmcmdline.c	2008/12/11 03:29:37	1.78
@@ -1091,7 +1091,6 @@
 	if (!(cmd = create_toolcontext(_cmdline.the_args, is_static, 0)))
 		return_NULL;
 
-	init_debug(cmd->current_settings.debug);
 	init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL);
 	init_test(cmd->current_settings.test);
 	init_full_scan_done(0);



             reply	other threads:[~2008-12-11  3:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11  3:29 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-11  3:30 LVM2 daemons/clvmd/lvm-functions.c tools/lvmcm wysochanski
2008-12-11  3:34 wysochanski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081211032937.19674.qmail@sourceware.org \
    --to=wysochanski@sourceware.org \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.