Skip to contentSkip to conversation

LVM2/tools lvmcmdline.c

PATCH [email protected] 1 participant 1 message Dec 11, 2008

lore
Share & tools
lore
#0 lore raw

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

Modified files:
tools : lvmcmdline.c

Log message:
Replace _apply_settings() after create_toolcontext() with equivalent inline.

Subsequent patches will refactor / remove each of these lines, as many of them are redundant when called immediately after create_toolcontext().

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.76&r2=1.77

tools/lvmcmdline.c +17 -1
@@ -1091,7 +1091,23 @@
 	if (!(cmd = create_toolcontext(_cmdline.the_args, is_static, 0)))
 		return_NULL;
 
-	_apply_settings(cmd);
+	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);
+	init_mirror_in_sync(0);
+
+	init_msg_prefix(cmd->default_settings.msg_prefix);
+	init_cmd_name(cmd->default_settings.cmd_name);
+
+	archive_enable(cmd, cmd->current_settings.archive);
+	backup_enable(cmd, cmd->current_settings.backup);
+
+	set_activation(cmd->current_settings.activation);
+
+	cmd->fmt = arg_ptr_value(cmd, metadatatype_ARG,
+				 cmd->current_settings.fmt);
+	cmd->handles_missing_pvs = 0;
 
 	return cmd;
 }