mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvm2app: Add function to retrieve the origin.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
This commit is contained in:
parent
9e0260c2e3
commit
a7f3dbf904
@ -1231,6 +1231,22 @@ const char *lvm_lv_get_name(const lv_t lv);
|
|||||||
*/
|
*/
|
||||||
const char *lvm_lv_get_attr(const lv_t lv);
|
const char *lvm_lv_get_attr(const lv_t lv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the origin of a snapshot.
|
||||||
|
*
|
||||||
|
* \memberof lv_t
|
||||||
|
*
|
||||||
|
* The memory allocated for the name is tied to the vg_t handle and will be
|
||||||
|
* released when lvm_vg_close() is called.
|
||||||
|
*
|
||||||
|
* \param lv
|
||||||
|
* Logical volume handle.
|
||||||
|
*
|
||||||
|
* \return
|
||||||
|
* Null if the logical volume is not a snapshot, else origin name.
|
||||||
|
*/
|
||||||
|
const char *lvm_lv_get_origin(const lv_t lv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current size in bytes of a logical volume.
|
* Get the current size in bytes of a logical volume.
|
||||||
*
|
*
|
||||||
|
@ -62,6 +62,11 @@ const char *lvm_lv_get_attr(const lv_t lv)
|
|||||||
return lv_attr_dup(lv->vg->vgmem, lv);
|
return lv_attr_dup(lv->vg->vgmem, lv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *lvm_lv_get_origin(const lv_t lv)
|
||||||
|
{
|
||||||
|
return lv_origin_dup(lv->vg->vgmem, lv);
|
||||||
|
}
|
||||||
|
|
||||||
struct lvm_property_value lvm_lv_get_property(const lv_t lv, const char *name)
|
struct lvm_property_value lvm_lv_get_property(const lv_t lv, const char *name)
|
||||||
{
|
{
|
||||||
return get_property(NULL, NULL, lv, NULL, NULL, NULL, name);
|
return get_property(NULL, NULL, lv, NULL, NULL, NULL, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user