diff options
author | Alasdair Kergon <agk@redhat.com> | 2012-01-23 17:46:31 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2012-01-23 17:46:31 +0000 |
commit | 5c9eae96472c01f1af4183ac6c0f8140fb7dd90a (patch) | |
tree | 56066c75506610b4df517a79154f4470edd16cf6 /lib/commands | |
parent | cab1c8ade19751830da29afb6298eb4b68094779 (diff) | |
download | lvm2-5c9eae96472c01f1af4183ac6c0f8140fb7dd90a.tar.gz |
Reorder fns in libdm-deptree.
Tweak dm_config interface and remove FIXMEs.
Diffstat (limited to 'lib/commands')
-rw-r--r-- | lib/commands/toolcontext.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 16c6d228e..3a5beb923 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -620,7 +620,6 @@ static struct dm_config_tree *_destroy_tag_configs(struct cmd_context *cmd) struct config_tree_list *cfl; struct dm_config_tree *cft_cmdline = NULL, *cft; -// FIXME No need for this - only one config tree now cft = dm_config_remove_cascaded_tree(cmd->cft); if (cft) { cft_cmdline = cmd->cft; @@ -1452,7 +1451,7 @@ int refresh_toolcontext(struct cmd_context *cmd) } dev_cache_exit(); _destroy_tags(cmd); -// FIXME Use cmd->cft_cmdline instead here. + cft_cmdline = _destroy_tag_configs(cmd); cmd->config_valid = 0; @@ -1465,7 +1464,6 @@ int refresh_toolcontext(struct cmd_context *cmd) /* Temporary duplicate cft pointer holding lvm.conf - replaced later */ cft_tmp = cmd->cft; if (cft_cmdline) -// FIXME Use cmd->cft_cmdline (convert string to cft again?) and merge instead cmd->cft = dm_config_insert_cascaded_tree(cft_cmdline, cft_tmp); /* Uses cmd->cft i.e. cft_cmdline + lvm.conf */ @@ -1479,15 +1477,11 @@ int refresh_toolcontext(struct cmd_context *cmd) if (!_init_tag_configs(cmd)) return 0; -// FIXME Will need to use a fresh copy of the lvm.conf cft as the original -// FIXME got destroyed when cft_cmdline was merged into it /* Merge all the tag config files with lvm.conf, returning a * fresh cft pointer in place of cft_tmp. */ if (!(cmd->cft = _merge_config_files(cmd, cft_tmp))) return 0; -// FIXME Merge instead - but keep a clean copy of cmd->cft at this point -// FIXME so we can easily 'remove' the effect of cft_cmdline after each cmd /* Finally we can make the proper, fully-merged, cmd->cft */ if (cft_cmdline) cmd->cft = dm_config_insert_cascaded_tree(cft_cmdline, cmd->cft); @@ -1539,7 +1533,6 @@ void destroy_toolcontext(struct cmd_context *cmd) dev_cache_exit(); _destroy_tags(cmd); -// FIXME destroy_tag_configs handles this itself again if ((cft_cmdline = _destroy_tag_configs(cmd))) dm_config_destroy(cft_cmdline); if (cmd->libmem) |