mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvm2api: extend lvm2api with lvm_lv_rename
Add support for LV rename.
This commit is contained in:
parent
92330ba9c8
commit
e52d316751
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.98 -
|
Version 2.02.98 -
|
||||||
=================================
|
=================================
|
||||||
|
Add lvm_lv_rename() to lvm2api.
|
||||||
Fix setvbuf code by closing and reopening stream before changing buffer.
|
Fix setvbuf code by closing and reopening stream before changing buffer.
|
||||||
Disable private buffering when using liblvm.
|
Disable private buffering when using liblvm.
|
||||||
When private stdin/stdout buffering is not used always use silent mode.
|
When private stdin/stdout buffering is not used always use silent mode.
|
||||||
|
@ -1343,6 +1343,22 @@ int lvm_lv_remove_tag(lv_t lv, const char *tag);
|
|||||||
*/
|
*/
|
||||||
struct dm_list *lvm_lv_get_tags(const lv_t lv);
|
struct dm_list *lvm_lv_get_tags(const lv_t lv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename logical volume to new_name.
|
||||||
|
*
|
||||||
|
* \memberof lv_t
|
||||||
|
*
|
||||||
|
* \param lv
|
||||||
|
* Logical volume handle.
|
||||||
|
*
|
||||||
|
* \param new_name
|
||||||
|
* New name of logical volume.
|
||||||
|
*
|
||||||
|
* \return
|
||||||
|
* 0 (success) or -1 (failure).
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
int lvm_lv_rename(lv_t lv, const char *new_name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resize logical volume to new_size bytes.
|
* Resize logical volume to new_size bytes.
|
||||||
|
@ -292,6 +292,16 @@ lv_t lvm_lv_from_uuid(vg_t vg, const char *uuid)
|
|||||||
}
|
}
|
||||||
return NULL;
|
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)
|
int lvm_lv_resize(const lv_t lv, uint64_t new_size)
|
||||||
{
|
{
|
||||||
/* FIXME: add lv resize code here */
|
/* FIXME: add lv resize code here */
|
||||||
|
Loading…
Reference in New Issue
Block a user