mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvconvert: fix displayed lv name in convert to snapshot
This commit is contained in:
parent
4efe8e83cf
commit
2fc66d2835
@ -2046,10 +2046,13 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
|
|||||||
const char *origin_name)
|
const char *origin_name)
|
||||||
{
|
{
|
||||||
struct logical_volume *org;
|
struct logical_volume *org;
|
||||||
const char *snap_name = display_lvname(lv);
|
const char *snap_name;
|
||||||
uint32_t chunk_size;
|
uint32_t chunk_size;
|
||||||
int zero;
|
int zero;
|
||||||
|
|
||||||
|
if (!(snap_name = dm_pool_strdup(lv->vg->vgmem, display_lvname(lv))))
|
||||||
|
return_0;
|
||||||
|
|
||||||
if (strcmp(lv->name, origin_name) == 0) {
|
if (strcmp(lv->name, origin_name) == 0) {
|
||||||
log_error("Unable to use %s as both snapshot and origin.", snap_name);
|
log_error("Unable to use %s as both snapshot and origin.", snap_name);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user