diff options
author | Dave Wysochanski <dwysocha@redhat.com> | 2010-02-14 03:21:37 +0000 |
---|---|---|
committer | Dave Wysochanski <dwysocha@redhat.com> | 2010-02-14 03:21:37 +0000 |
commit | 629efc6a893eaf2b5727e5df7feff0fa3b8f874e (patch) | |
tree | 3f1d6df7af467493007b8a0cf3d43fa43768c139 /liblvm/lvm_pv.c | |
parent | ed3329eb45b712389aa0282d13dc50b17516240e (diff) | |
download | lvm2-629efc6a893eaf2b5727e5df7feff0fa3b8f874e.tar.gz lvm2-629efc6a893eaf2b5727e5df7feff0fa3b8f874e.tar.xz lvm2-629efc6a893eaf2b5727e5df7feff0fa3b8f874e.zip |
Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.
We add these exports to show the pv_size and pv_free and dev_size
fields.
Fixes rhbz561423.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Diffstat (limited to 'liblvm/lvm_pv.c')
-rw-r--r-- | liblvm/lvm_pv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c index 85485971..a97f26fe 100644 --- a/liblvm/lvm_pv.c +++ b/liblvm/lvm_pv.c @@ -43,6 +43,21 @@ uint64_t lvm_pv_get_mda_count(const pv_t pv) return (uint64_t) pv_mda_count(pv); } +uint64_t lvm_pv_get_dev_size(const pv_t pv) +{ + return (uint64_t) SECTOR_SIZE*pv_dev_size(pv); +} + +uint64_t lvm_pv_get_size(const pv_t pv) +{ + return (uint64_t) SECTOR_SIZE*pv_size_field(pv); +} + +uint64_t lvm_pv_get_free(const pv_t pv) +{ + return (uint64_t) SECTOR_SIZE*pv_free(pv); +} + int lvm_pv_resize(const pv_t pv, uint64_t new_size) { /* FIXME: add pv resize code here */ |