1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-25 21:57:45 +03:00

dmstats: support --noheadings for histogram fields

This commit is contained in:
Bryn M. Reeves 2015-09-03 21:56:34 +01:00
parent 84d88cb2cf
commit 49b5022993

View File

@ -3443,7 +3443,7 @@ static const char *_get_histogram_string(const struct dm_stats *dms, int rel,
int vals, int bounds)
{
const struct dm_histogram *dmh;
int flags = 0;
int flags = 0, width = (_switches[NOHEADINGS_ARG]) ? -1 : 0;
if (!(dmh = dm_stats_get_histogram(dms, DM_STATS_REGION_CURRENT,
DM_STATS_AREA_CURRENT)))
@ -3460,7 +3460,7 @@ static const char *_get_histogram_string(const struct dm_stats *dms, int rel,
flags |= (_switches[NOTIMESUFFIX_ARG]) ? 0 : DM_HISTOGRAM_SUFFIX;
/* FIXME: make unit conversion optional. */
return dm_histogram_to_string(dmh, -1, 0, flags);
return dm_histogram_to_string(dmh, -1, width, flags);
}
static int _stats_hist_count_disp(struct dm_report *rh,