1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Ignore empty strings in config files.

This commit is contained in:
Alasdair Kergon 2006-04-28 13:30:59 +00:00
parent 12ccdb25e4
commit 81b4308bde
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.06 -
=================================
Ignore empty strings in config files.
Require non-zero regionsize and document parameter on lvcreate man page.
Invalidate cache if composition of VG changed externally.

View File

@ -752,9 +752,9 @@ const char *find_config_str(const struct config_node *cn,
{
const struct config_node *n = find_config_node(cn, path);
if (n && n->v->type == CFG_STRING) {
if (*n->v->v.str)
log_very_verbose("Setting %s to %s", path, n->v->v.str);
/* Empty strings are ignored */
if ((n && n->v->type == CFG_STRING) && (*n->v->v.str))
log_very_verbose("Setting %s to %s", path, n->v->v.str);
return n->v->v.str;
}