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

lv: show X attr when lv_info fails

Print 'X' also when lv_info() fails.
(i.e. compilation with --disable-ioctl)
This commit is contained in:
Zdenek Kabelac 2014-04-29 20:14:36 +02:00
parent 816cc94ac1
commit 62ad6dee18

View File

@ -613,10 +613,10 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
repstr[3] = (lv->status & FIXED_MINOR) ? 'm' : '-';
if (!activation()) {
if (!activation() || !lv_info(lv->vg->cmd, lv, 0, &info, 1, 0)) {
repstr[4] = 'X'; /* Unknown */
repstr[5] = 'X'; /* Unknown */
} else if (lv_info(lv->vg->cmd, lv, 0, &info, 1, 0) && info.exists) {
} else if (info.exists) {
if (info.suspended)
repstr[4] = 's'; /* Suspended */
else if (info.live_table)