diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-08-07 18:11:23 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-08-08 11:43:52 +0100 |
commit | 666c77c0f27f1ea3d0df411b5ad64719f750c177 (patch) | |
tree | 0c6801794a00f8633a72ca9fb3b74c50f1c9db48 /libdm/libdm-report.c | |
parent | cafe145ba2c77138b5b2c8832b4c784e4c9b5e76 (diff) | |
download | lvm2-666c77c0f27f1ea3d0df411b5ad64719f750c177.tar.gz |
libdm: add dm_report_column_headings
Add a function to print column headings regardless of whether they
have already been output. This will be used by dmstats to issue
periodic reminders of the column headings.
This patch removes a check for RH_HEADINGS_PRINTED from
_report_headings that prevents headings being displayed if the flag
is already set; this check is redundant since the only existing
caller (_output_as_columns()) already tests the flag before
calling the function.
Diffstat (limited to 'libdm/libdm-report.c')
-rw-r--r-- | libdm/libdm-report.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index edb3fe2e3..4b09854fc 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -3922,9 +3922,6 @@ static int _report_headings(struct dm_report *rh) char *buf = NULL; size_t buf_size = 0; - if (rh->flags & RH_HEADINGS_PRINTED) - return 1; - rh->flags |= RH_HEADINGS_PRINTED; if (!(rh->flags & DM_REPORT_OUTPUT_HEADINGS)) @@ -3997,6 +3994,11 @@ static int _report_headings(struct dm_report *rh) return 0; } +int dm_report_column_headings(struct dm_report *rh) +{ + return _report_headings(rh); +} + /* * Sort rows of data */ |