All of lore.kernel.org
 help / color / mirror / Atom feed
From: wysochanski@sourceware.org <wysochanski@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 lib/commands/toolcontext.c tools/lvmcmdline.c
Date: 11 Dec 2008 03:31:48 -0000	[thread overview]
Message-ID: <20081211033148.26654.qmail@sourceware.org> (raw)

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

Modified files:
	lib/commands   : toolcontext.c 
	tools          : lvmcmdline.c 

Log message:
	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.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.65&r2=1.66
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.80&r2=1.81

--- LVM2/lib/commands/toolcontext.c	2008/12/07 04:27:56	1.65
+++ LVM2/lib/commands/toolcontext.c	2008/12/11 03:31:47	1.66
@@ -162,6 +162,7 @@
 	/* 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))
--- LVM2/tools/lvmcmdline.c	2008/12/11 03:31:10	1.80
+++ LVM2/tools/lvmcmdline.c	2008/12/11 03:31:47	1.81
@@ -1091,7 +1091,6 @@
 	if (!(cmd = create_toolcontext(_cmdline.the_args, is_static, 0)))
 		return_NULL;
 
-	init_test(cmd->current_settings.test);
 	init_full_scan_done(0);
 	init_mirror_in_sync(0);
 



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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11  3:31 wysochanski [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-12-11  3:36 LVM2 lib/commands/toolcontext.c tools/lvmcmdline.c wysochanski
2008-12-11 23:35 ` Alasdair G Kergon
2008-12-12  3:30 wysochanski
2011-06-27 23:43 agk

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=20081211033148.26654.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.