mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: config: fix dm_config_write_node and variants to properly return error on failures
The error was not propagated if _write_config (that is part of dm_config_write_node and all its variants) was called recursively for subsections.
This commit is contained in:
parent
67c5006e12
commit
9720898c8e
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.119 -
|
Version 1.02.119 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Fix dm_config_write_node and variants to return error on subsection failures.
|
||||||
Remove 4096 char limit due to buffer size if writing dm_config_node.
|
Remove 4096 char limit due to buffer size if writing dm_config_node.
|
||||||
|
|
||||||
Version 1.02.118 - 26th February 2016
|
Version 1.02.118 - 26th February 2016
|
||||||
|
@ -366,7 +366,8 @@ static int _write_config(const struct dm_config_node *n, int only_one,
|
|||||||
line_append(" {");
|
line_append(" {");
|
||||||
if (!_line_end(n, out))
|
if (!_line_end(n, out))
|
||||||
return_0;
|
return_0;
|
||||||
_write_config(n->child, 0, out, level + 1);
|
if (!_write_config(n->child, 0, out, level + 1))
|
||||||
|
return_0;
|
||||||
if (!_line_start(out))
|
if (!_line_start(out))
|
||||||
return_0;
|
return_0;
|
||||||
line_append("%s}", space);
|
line_append("%s}", space);
|
||||||
|
Loading…
Reference in New Issue
Block a user