Skip to contentSkip to conversation

master - libdm: report: add dm_report_group_output_and_pop_all

PATCH Peter Rajnoha 1 participant 1 message Aug 9, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7d1125e5b785014d3bae34acd158c528a4222871
Commit:        7d1125e5b785014d3bae34acd158c528a4222871
Parent:        d86caf952ee208ef2b3b56937af670c76db75ba0
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Thu Aug 4 13:50:45 2016 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Tue Aug 9 18:24:45 2016 +0200

libdm: report: add dm_report_group_output_and_pop_all

The dm_report_group_output_and_pop_all calls dm_report_output and dm_report_group_pop for all the items that are currently in report group. This is just a shortcut that makes it easier to output and pop group's content so the group handle can be reused again without a need to initialize and configure it again.

The functionality of dm_report_group_output_and_pop_all is the same as dm_report_destroy but without destroying the report group handle.

---
 libdm/.exported_symbols.DM_1_02_133 |    1 +
 libdm/libdevmapper.h                |    1 +
 libdm/libdm-report.c                |   59 ++++++++++++----------------------
 3 files changed, 23 insertions(+), 38 deletions(-)
libdm/.exported_symbols.DM_1_02_133 +1 -0
index 4318f80..f104808 100644
@@ -1 +1,2 @@
 dm_report_destroy_rows
+dm_report_group_output_and_pop_all
libdm/libdevmapper.h +1 -0
index 844a455..5246b15 100644
@@ -2974,6 +2974,7 @@ typedef enum {
 struct dm_report_group *dm_report_group_create(dm_report_group_type_t type, void *data);
 int dm_report_group_push(struct dm_report_group *group, struct dm_report *report, void *data);
 int dm_report_group_pop(struct dm_report_group *group);
+int dm_report_group_output_and_pop_all(struct dm_report_group *group);
 int dm_report_group_destroy(struct dm_report_group *group);
 
 /*
libdm/libdm-report.c +21 -38

78 lines not on this page · raw message