Skip to contentSkip to conversation

master - libdm: report: add DM_REPORT_OUTPUT_MULTIPLE_TIMES report flag to keep report data even after output is done

PATCH Peter Rajnoha 1 participant 1 message Jun 20, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f2facdc1d01b0353b05623634d34924317c44a9c
Commit:        f2facdc1d01b0353b05623634d34924317c44a9c
Parent:        0ba5f4b8e977a6f2f45f95777da508b42d84c01a
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Thu May 12 14:34:04 2016 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Mon Jun 20 11:33:43 2016 +0200

libdm: report: add DM_REPORT_OUTPUT_MULTIPLE_TIMES report flag to keep report data even after output is done

The DM_REPORT_OUTPUT_MULTIPLE_TIMES instructs reporting code to keep rows even after dm_report_output call - the rows are not destroyed in this case which makes it possible to call dm_report_output multiple times.

---
 WHATS_NEW_DM         |    1 +
 libdm/libdevmapper.h |    1 +
 libdm/libdm-report.c |   83 ++++++++++++++++++++++++++++++++++---------------
 3 files changed, 59 insertions(+), 26 deletions(-)
WHATS_NEW_DM +1 -0
index 7e98e1f..6842771 100644
@@ -1,5 +1,6 @@
 Version 1.02.128 -
 =================================
+  Add DM_REPORT_OUTPUT_MULTIPLE_TIMES flag for multiple output of same report.
   Move field width handling/sort init from dm_report_object to dm_report_output.
   Add _LOG_BYPASS_REPORT flag for bypassing any log report currently set.
   Introduce DM_REPORT_GROUP_JSON for report group with JSON output format.
libdm/libdevmapper.h +1 -0
index cad79dd..61ab279 100644
@@ -2606,6 +2606,7 @@ const void *dm_report_value_cache_get(struct dm_report *rh, const char *name);
 #define DM_REPORT_OUTPUT_FIELD_NAME_PREFIX	0x00000008
 #define DM_REPORT_OUTPUT_FIELD_UNQUOTED		0x00000010
 #define DM_REPORT_OUTPUT_COLUMNS_AS_ROWS	0x00000020
+#define DM_REPORT_OUTPUT_MULTIPLE_TIMES		0x00000040
 
 struct dm_report *dm_report_init(uint32_t *report_types,
 				 const struct dm_report_object_type *types,
libdm/libdm-report.c +57 -26

146 lines not on this page · raw message