1
0
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:
David Teigland 2024-03-20 09:13:06 -05:00
parent 4efe8e83cf
commit 2fc66d2835

View File

@ -2046,10 +2046,13 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
const char *origin_name)
{
struct logical_volume *org;
const char *snap_name = display_lvname(lv);
const char *snap_name;
uint32_t chunk_size;
int zero;
if (!(snap_name = dm_pool_strdup(lv->vg->vgmem, display_lvname(lv))))
return_0;
if (strcmp(lv->name, origin_name) == 0) {
log_error("Unable to use %s as both snapshot and origin.", snap_name);
return 0;