]> sourceware.org Git - lvm2.git/commitdiff
Log value chosen in _find_config_bool like other variable types do.
authorAlasdair Kergon <agk@redhat.com>
Tue, 8 May 2012 14:31:44 +0000 (14:31 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 8 May 2012 14:31:44 +0000 (14:31 +0000)
WHATS_NEW_DM
libdm/libdm-config.c

index 28fd06d0ed06c958ab754c06db11786fd1a0afec..6800b5a82059a23e34aeff2f4bcc5814cdb5a3ac 100644 (file)
@@ -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.
index 8683b5a57ce571a9b4e297b1aeb37fbdac86e12b..d9d3882f2a564ac7671ec5f711b0a23f59fd8f3b 100644 (file)
@@ -842,22 +842,29 @@ 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;
 
-       v = n->v;
+               switch (v->type) {
+               case DM_CFG_INT:
+                       b = v->v.i ? 1 : 0;
+                       log_very_verbose("Setting %s to %d", path, b);
+                       return b;
 
-       switch (v->type) {
-       case DM_CFG_INT:
-               return v->v.i ? 1 : 0;
-
-       case DM_CFG_STRING:
-               return _str_to_bool(v->v.str, fail);
-       default:
-               ;
+               case DM_CFG_STRING:
+                       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;
 }
 
This page took 0.042651 seconds and 5 git commands to generate.