Martin Milata <mmilata(a)redhat.com> writes:
Collect events are run both in report mode (-r) and in standalone
collect mode (-c).
---
src/cli/cli-report.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/cli/cli-report.h | 1 +
src/cli/cli.c | 9 ++++++
3 files changed, 88 insertions(+), 0 deletions(-)
diff --git a/src/cli/cli-report.c b/src/cli/cli-report.c
index 689fc4e..9fdf05d 100644
--- a/src/cli/cli-report.c
+++ b/src/cli/cli-report.c
@@ -664,6 +664,75 @@ GList *str_to_glist(char *str, int delim)
return list;
}
+/* When this function returns the dump dir passed as dd is closed */
+int collect(const char *dump_dir_name, struct dump_dir *dd, int
batch)
Is there a reason why this function takes both dump_dir_name and
already-opened dd?
It seems that dump dir can be opened and closed inside of this function,
similarly to the report function.
+{
+ int errors = 0;
+ char wanted_collectors[255];
+ GList *selected_events = NULL;
+
+ char *collect_events_as_lines = list_possible_events(dd, NULL,
"collect");
+ dd_close(dd);