mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
config: add config_tree_from_string_without_dup_node_check to replace dm_config_from_string where needed
This commit is contained in:
parent
e40fbd08c8
commit
045772aa30
@ -161,6 +161,21 @@ void chain_node(struct dm_config_node *cn,
|
||||
|
||||
}
|
||||
|
||||
struct dm_config_tree *config_tree_from_string_without_dup_node_check(const char *config_settings)
|
||||
{
|
||||
struct dm_config_tree *cft;
|
||||
|
||||
if (!(cft = dm_config_create()))
|
||||
return_NULL;
|
||||
|
||||
if (!dm_config_parse_without_dup_node_check(cft, config_settings, config_settings + strlen(config_settings))) {
|
||||
dm_config_destroy(cft);
|
||||
return_NULL;
|
||||
}
|
||||
|
||||
return cft;
|
||||
}
|
||||
|
||||
struct dm_config_node *make_config_node(struct dm_config_tree *cft,
|
||||
const char *key,
|
||||
struct dm_config_node *parent,
|
||||
|
@ -66,4 +66,6 @@ struct dm_config_node *config_make_nodes(struct dm_config_tree *cft,
|
||||
struct dm_config_node *pre_sib,
|
||||
...);
|
||||
|
||||
struct dm_config_tree *config_tree_from_string_without_dup_node_check(const char *config_settings);
|
||||
|
||||
#endif /* _LVM_DAEMON_CONFIG_UTIL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user