]> sourceware.org Git - lvm2.git/commit
Move initialization of cmd->fmt into init_formats().
authorDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:36:16 +0000 (03:36 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Thu, 11 Dec 2008 03:36:16 +0000 (03:36 +0000)
commitf31e8d08cdd9d8053e0c8e2a59b021de94758da6
tree74df9eba1c6557443e0887d265d63f39dc2dde89
parent224c8ec0fa2da839443ae7e7a7214bdf016c5a47
Move initialization of cmd->fmt into init_formats().

init_formats() sets up the command formats, and currently sets cmd->fmt_backup
but does not set cmd->fmt to a default value.  This seems incorrect so we
set it to cmd->default_settings.fmt before returning.

The call we remove here may set cmd->fmt based on a command line setting.
But it is safe to remove this, because the only caller of init_lvm() that
cares about the cmdline override is the cmdline tools (clvmd does not care),
called from lvm2_main().  After lvm2_main() calls init_lvm(), it later calls
lvm_run_command().  In lvm_run_command(), we have a call to _apply_settings(),
which has the identical assignment of cmd->fmt that this patch removes.
lib/commands/toolcontext.c
tools/lvmcmdline.c
This page took 0.030696 seconds and 5 git commands to generate.