1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

Make it possible to represent type-correct single-item arrays in config trees.

This commit is contained in:
Petr Rockai 2011-07-19 19:12:38 +00:00
parent cc6032956f
commit 0a305e9666

View File

@ -486,11 +486,11 @@ static int _write_config(const struct config_node *n, int only_one,
line_append("="); line_append("=");
if (v->next) { if (v->next) {
line_append("["); line_append("[");
while (v) { while (v && v->type != CFG_EMPTY_ARRAY) {
if (!_write_value(outline, v)) if (!_write_value(outline, v))
return_0; return_0;
v = v->next; v = v->next;
if (v) if (v && v->type != CFG_EMPTY_ARRAY)
line_append(", "); line_append(", ");
} }
line_append("]"); line_append("]");