summaryrefslogtreecommitdiff
path: root/liblvm/lvm_vg.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2009-09-14 19:43:11 +0000
committerDave Wysochanski <dwysocha@redhat.com>2009-09-14 19:43:11 +0000
commitfca434258aa399ac3bb475d27d43d4dd656a7cd7 (patch)
tree41b2f7ef470c3cdce25812464405366a141ee413 /liblvm/lvm_vg.c
parenta0b0df936bd19d94d28441397b24cfa87cea2fdb (diff)
downloadlvm2-fca434258aa399ac3bb475d27d43d4dd656a7cd7.tar.gz
Add most relevant vg_attr fields as lvm2app 'get' functions.
Of the vgs field vg_attr, a few of the most likely to be used attributes are clustered, exported, and partial. This patch adds the following 3 functions: uint64_t lvm_vg_is_clustered(const vg_t vg) uint64_t lvm_vg_is_exported(const vg_t vg) uint64_t lvm_vg_is_partial(const vg_t vg)
Diffstat (limited to 'liblvm/lvm_vg.c')
-rw-r--r--liblvm/lvm_vg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/liblvm/lvm_vg.c b/liblvm/lvm_vg.c
index dcfd72266..a0a7b1fd1 100644
--- a/liblvm/lvm_vg.c
+++ b/liblvm/lvm_vg.c
@@ -243,6 +243,21 @@ uint64_t lvm_vg_get_seqno(const vg_t vg)
return vg_seqno(vg);
}
+uint64_t lvm_vg_is_clustered(const vg_t vg)
+{
+ return vg_is_clustered(vg);
+}
+
+uint64_t lvm_vg_is_exported(const vg_t vg)
+{
+ return vg_is_exported(vg);
+}
+
+uint64_t lvm_vg_is_partial(const vg_t vg)
+{
+ return (vg_missing_pv_count(vg) != 0);
+}
+
/* FIXME: invalid handle? return INTMAX? */
uint64_t lvm_vg_get_size(const vg_t vg)
{