summaryrefslogtreecommitdiffstats
path: root/tools/lvmcmdline.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2008-12-11 03:36:16 +0000
committerDave Wysochanski <dwysocha@redhat.com>2008-12-11 03:36:16 +0000
commit9a04baa27c0507258ab826665a2b9ac3fa6e8cb5 (patch)
tree74df9eba1c6557443e0887d265d63f39dc2dde89 /tools/lvmcmdline.c
parent3368322e0d6c3ea0b3a16733dc1fd873325b836e (diff)
downloadlvm2-9a04baa27c0507258ab826665a2b9ac3fa6e8cb5.tar.gz
lvm2-9a04baa27c0507258ab826665a2b9ac3fa6e8cb5.tar.xz
lvm2-9a04baa27c0507258ab826665a2b9ac3fa6e8cb5.zip
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.
Diffstat (limited to 'tools/lvmcmdline.c')
-rw-r--r--tools/lvmcmdline.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index de98940d..66a20ad5 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1094,9 +1094,6 @@ struct cmd_context *init_lvm(unsigned is_static)
init_full_scan_done(0);
init_mirror_in_sync(0);
- cmd->fmt = arg_ptr_value(cmd, metadatatype_ARG,
- cmd->current_settings.fmt);
-
return cmd;
}