summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2016-03-01 15:23:58 +0100
committerPeter Rajnoha <prajnoha@redhat.com>2016-03-03 11:26:52 +0100
commitadc4cb11078538095560793920b9d5d5153fd83a (patch)
tree57f460709d2c9c7d4d205639fa553e1062c4d030
parentd58c8d723cfd8d90d7e67e5b5ad2d854217bf55b (diff)
downloadlvm2-adc4cb11078538095560793920b9d5d5153fd83a.tar.gz
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.
-rw-r--r--lib/metadata/lv.c7
1 files changed, 5 insertions, 2 deletions
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) {