summaryrefslogtreecommitdiff
path: root/liblvm/lvm2app.h
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-07-31 16:18:01 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2012-07-31 16:18:01 +0200
commitf64f22e2d657346197fcd0b8e97e87b6d290ab2b (patch)
tree41ec520fc4b8a56427b2401f1c70c200bcb0908b /liblvm/lvm2app.h
parent8791d01fee7f5977b037400020db97a40821b94a (diff)
downloadlvm2-f64f22e2d657346197fcd0b8e97e87b6d290ab2b.tar.gz
lvm2app: add lvm_config_find_bool function
To effectively retrieve the setting of anything that could be enabled or disabled.
Diffstat (limited to 'liblvm/lvm2app.h')
-rw-r--r--liblvm/lvm2app.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/liblvm/lvm2app.h b/liblvm/lvm2app.h
index dd200e3e3..72c0d79ff 100644
--- a/liblvm/lvm2app.h
+++ b/liblvm/lvm2app.h
@@ -303,6 +303,28 @@ int lvm_config_reload(lvm_t libh);
int lvm_config_override(lvm_t libh, const char *config_string);
/**
+ * Find a boolean value in the LVM configuration.
+ *
+ * \memberof lvm_t
+ *
+ * This function finds a boolean value associated with a path
+ * in current LVM configuration.
+ *
+ * \param libh
+ * Handle obtained from lvm_init().
+ *
+ * \param config_path
+ * A path in LVM configuration
+ *
+ * \param fail
+ * Value to return if the path is not found.
+ *
+ * \return
+ * boolean value for 'config_path' (success) or the value of 'fail' (error)
+ */
+int lvm_config_find_bool(lvm_t libh, const char *config_path, int fail);
+
+/**
* Return stored error no describing last LVM API error.
*
* \memberof lvm_t