diff options
Diffstat (limited to 'liblvm/lvm_lv.c')
-rw-r--r-- | liblvm/lvm_lv.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/liblvm/lvm_lv.c b/liblvm/lvm_lv.c index 2d4dc023..d47a8578 100644 --- a/liblvm/lvm_lv.c +++ b/liblvm/lvm_lv.c @@ -292,6 +292,16 @@ lv_t lvm_lv_from_uuid(vg_t vg, const char *uuid) } return NULL; } + +int lvm_lv_rename(lv_t lv, const char *new_name) +{ + if (!lv_rename(lv->vg->cmd, lv, new_name)) { + log_verbose("LV Rename failed."); + return -1; + } + return 0; +} + int lvm_lv_resize(const lv_t lv, uint64_t new_size) { /* FIXME: add lv resize code here */ |