]> sourceware.org Git - lvm2.git/commitdiff
libdm: report: add dm_report_destroy_rows
authorPeter Rajnoha <prajnoha@redhat.com>
Thu, 4 Aug 2016 07:42:33 +0000 (09:42 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Tue, 9 Aug 2016 16:24:45 +0000 (18:24 +0200)
Calling dm_report_destroy_rows makes it possible to destroy any report
content we have but at the same time it doesn't destroy the report
handle itself, thus it's possible to reuse that handle again for new
report content.

Functionally, this is the same as calling dm_report_output with the
report handle but omitting the output iself. This functionality may
be useful if we, for whatever reason, need to discard the report
content and start a fresh new one but with the same report configuration
and initialization and thus we can just reuse the existing handle.

libdm/.exported_symbols.DM_1_02_133 [new file with mode: 0644]
libdm/libdevmapper.h
libdm/libdm-report.c

diff --git a/libdm/.exported_symbols.DM_1_02_133 b/libdm/.exported_symbols.DM_1_02_133
new file mode 100644 (file)
index 0000000..4318f80
--- /dev/null
@@ -0,0 +1 @@
+dm_report_destroy_rows
index 22700160a64da6de2d977e153e054e527a141ab0..844a45548a7d2b4a5c5d994bb49cde2a08bd4c8d 100644 (file)
@@ -2907,6 +2907,11 @@ int dm_report_compact_given_fields(struct dm_report *rh, const char *fields);
  */
 int dm_report_is_empty(struct dm_report *rh);
 
+/*
+ * Destroy report content without doing output.
+ */
+void dm_report_destroy_rows(struct dm_report *rh);
+
 int dm_report_output(struct dm_report *rh);
 
 /*
index 02fead5738f276d326172348e654fb7fead23378..886d8a2aa5fe8d2b162154413ab7bab6be27c2fb 100644 (file)
@@ -4790,6 +4790,11 @@ out:
        return r;
 }
 
+void dm_report_destroy_rows(struct dm_report *rh)
+{
+       _destroy_rows(rh);
+}
+
 static int _report_group_create_single(struct dm_report_group *group)
 {
        return 1;
This page took 0.04767 seconds and 5 git commands to generate.