1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

active: device name limit is NAME_LEN

Use existing NAME_LEN instead of 257 value.
Add missing backtrace.
This commit is contained in:
Zdenek Kabelac 2023-07-17 12:43:39 +02:00
parent 0670338e0b
commit c5e4326337

View File

@ -2721,11 +2721,11 @@ static int _remove_dm_dev_by_name(const char *name)
/* Work all segments of @lv removing any existing, closed "*-missing_N_0" sub devices. */
static int _lv_remove_any_missing_subdevs(struct logical_volume *lv)
{
if (lv) {
uint32_t seg_no = 0;
char name[257];
struct lv_segment *seg;
char name[NAME_LEN];
struct lv_segment *seg;
uint32_t seg_no = 0;
if (lv) {
dm_list_iterate_items(seg, &lv->segments) {
if (dm_snprintf(name, sizeof(name), "%s-%s-missing_%u_0", seg->lv->vg->name, seg->lv->name, seg_no) < 0)
return_0;