mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-22 06:50:52 +03:00
vdo: correctly size string array
Fix logging of VDO configuration info message which has acutally printed " and," using next element.. Increase the array element size so it can store >=5 bytes for " and" + \0.
This commit is contained in:
parent
74a2325261
commit
a187f02ed5
@ -759,7 +759,7 @@ static int _vdo_snprintf(char **buf, size_t *bufsize, const char *format, ...)
|
||||
|
||||
int check_vdo_constrains(struct cmd_context *cmd, const struct vdo_pool_size_config *cfg)
|
||||
{
|
||||
static const char _vdo_split[][4] = { "", " and", ",", "," };
|
||||
static const char _vdo_split[][8] = { "", " and", ",", "," };
|
||||
uint64_t req_mb, total_mb, available_mb;
|
||||
uint64_t phy_mb = _round_sectors_to_tib(UINT64_C(268) * cfg->physical_size); // 268 MiB per 1 TiB of physical size
|
||||
uint64_t virt_mb = _round_1024(UINT64_C(1638) * _round_sectors_to_tib(cfg->virtual_size)); // 1.6 MiB per 1 TiB
|
||||
|
Loading…
x
Reference in New Issue
Block a user