1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

display: missed to count with 0

dm_snprintf() returns upon success the number of characters printed
(excluding the null byte used to end output to strings).

So add extra byte to preserve \0.
This fixes regression when displaying more then a single lv name.
This commit is contained in:
Zdenek Kabelac 2015-07-02 00:04:38 +02:00
parent 21c0b1134f
commit 7f63fff9c4
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.124 - Version 2.02.124 -
================================= =================================
Fix regression when printing more lv names via display_lvname (2.02.122).
Add missing error logging to unlock_vg and sync_local_dev_names callers. Add missing error logging to unlock_vg and sync_local_dev_names callers.
Version 2.02.123 - 30th June 2015 Version 2.02.123 - 30th June 2015

View File

@ -109,7 +109,7 @@ const char *display_lvname(const struct logical_volume *lv)
return NULL; return NULL;
} }
lv->vg->cmd->display_lvname_idx += r; lv->vg->cmd->display_lvname_idx += r + 1;
return name; return name;
} }