mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
Log value chosen in _find_config_bool like other variable types do.
This commit is contained in:
parent
eb2d70293d
commit
fccc6ea295
@ -1,5 +1,6 @@
|
||||
Version 1.02.75 -
|
||||
================================
|
||||
Log value chosen in _find_config_bool like other variable types do.
|
||||
Synchronize with dead of dmeventd.
|
||||
Rename (Blk)DevNames/DevNos dmsetup header to (Blk)DevNamesUsed/DevNosUsed.
|
||||
Add configure --with-veritysetup for independent veritysetup tool.
|
||||
|
@ -842,21 +842,28 @@ static int _find_config_bool(const void *start, node_lookup_fn find,
|
||||
{
|
||||
const struct dm_config_node *n = find(start, path);
|
||||
const struct dm_config_value *v;
|
||||
int b;
|
||||
|
||||
if (!n)
|
||||
return fail;
|
||||
|
||||
if (n) {
|
||||
v = n->v;
|
||||
|
||||
switch (v->type) {
|
||||
case DM_CFG_INT:
|
||||
return v->v.i ? 1 : 0;
|
||||
b = v->v.i ? 1 : 0;
|
||||
log_very_verbose("Setting %s to %d", path, b);
|
||||
return b;
|
||||
|
||||
case DM_CFG_STRING:
|
||||
return _str_to_bool(v->v.str, fail);
|
||||
b = _str_to_bool(v->v.str, fail);
|
||||
log_very_verbose("Setting %s to %d", path, b);
|
||||
return b;
|
||||
default:
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
log_very_verbose("%s not found in config: defaulting to %d",
|
||||
path, fail);
|
||||
|
||||
return fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user