char *pv_attr_dup(struct dm_pool *mem, const struct physical_volume *pv)
{
char *repstr;
+ int used = is_used_pv(pv);
- if (!(repstr = dm_pool_zalloc(mem, 4))) {
+ if (!(repstr = dm_pool_zalloc(mem, 5))) {
log_error("dm_pool_alloc failed");
return NULL;
}
repstr[0] = (pv->status & ALLOCATABLE_PV) ? 'a' : '-';
repstr[1] = (pv->status & EXPORTED_VG) ? 'x' : '-';
repstr[2] = (pv->status & MISSING_PV) ? 'm' : '-';
+ repstr[3] = used <= 0 ? '-' : 'u';
return repstr;
}
.IP
With \fB\-\-segments\fP, any "pvseg_" prefixes are optional; otherwise any
"pv_" prefixes are optional. Columns mentioned in \fBvgs\fP(8) can also
-be chosen. The pv_attr bits are: (a)llocatable, e(x)ported and (m)issing.
+be chosen. The pv_attr bits are: (a)llocatable, e(x)ported, (m)issing and
+(u)sed.
.TP
.B \-\-segments
Produces one line of output for each contiguous allocation of space on each