From: Peter Rajnoha Date: Tue, 1 Mar 2016 14:23:58 +0000 (+0100) Subject: report: display (h)istorical state in lv_attr field X-Git-Tag: v2_02_145~32 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8b9953e8c59ef4c3ced277cc40b8bb5006a24161;p=lvm2.git report: display (h)istorical state in lv_attr field The 'historical' state is displayed as 5th bit ("state") in the lv_attr field and denoted by new 'h' character. --- diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index ab937c4ab..9e9549d00 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -1040,7 +1040,7 @@ char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_ } /* Blank if this is a "free space" LV. */ - if (!*lv->name) + if (!*lv->name && !lv_is_historical(lv)) goto out; if (lv_is_pvmove(lv)) @@ -1104,7 +1104,10 @@ char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_ repstr[3] = (lv->status & FIXED_MINOR) ? 'm' : '-'; - if (!activation() || !lvdm->info_ok) { + if (lv_is_historical(lv)) { + repstr[4] = 'h'; + repstr[5] = '-'; + } else if (!activation() || !lvdm->info_ok) { repstr[4] = 'X'; /* Unknown */ repstr[5] = 'X'; /* Unknown */ } else if (lvdm->info.exists) {