mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
libdm: report: add dm_report_destroy_rows
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.
This commit is contained in:
parent
5649834f7d
commit
9c21139284
1
libdm/.exported_symbols.DM_1_02_133
Normal file
1
libdm/.exported_symbols.DM_1_02_133
Normal file
@ -0,0 +1 @@
|
||||
dm_report_destroy_rows
|
@ -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);
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user