diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-01 18:52:11 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-11-01 18:52:11 +0100 |
commit | 8864e7d8ab05b59372f55ec8d637296aefa1515e (patch) | |
tree | 820b284348e0e0672534abdca6231212b4bf3af8 /inc | |
parent | 3b1dd4985ac7e32a3a1a498214bd26df29089dbc (diff) | |
download | abrt-8864e7d8ab05b59372f55ec8d637296aefa1515e.tar.gz abrt-8864e7d8ab05b59372f55ec8d637296aefa1515e.tar.xz abrt-8864e7d8ab05b59372f55ec8d637296aefa1515e.zip |
abrt-handle-crashdump: new semi-debug utility to run abrt actions for a specified event
Some reworking of run_action() API was needed
to make it possible to put it into libABRT.
abrt-handle-crashdump has no -l option yet:
$ abrt-handle-crashdump
Usage: abrt-handle-crashdump [-vs] -d DIR -e EVENT
Handle crash dump according to rules in abrt_action.conf
-v, --verbose be verbose
-s Log to syslog
-d DIR Crash dump directory
-e EVENT Event
Can (will) extend it later.
Run-tested: performed "analyze" step by hand with
abrt-handle-crashdump -e analyze -d CRASH_DUMP_DIR
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'inc')
-rw-r--r-- | inc/abrtlib.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/inc/abrtlib.h b/inc/abrtlib.h index f9796ada..52896fe9 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -213,6 +213,18 @@ char* get_cmdline(pid_t pid); /* Returns 1 if abrtd daemon is running, 0 otherwise. */ int daemon_is_ok(); +struct run_event_state { + int (*post_run_callback)(const char *dump_dir_name, void *param); + void *post_run_param; + char* (*logging_callback)(char *log_line, void *param); + void *logging_param; +}; +static inline struct run_event_state *new_run_event_state() + { return (struct run_event_state*)xzalloc(sizeof(struct run_event_state)); } +static inline void free_run_event_state(struct run_event_state *state) + { free(state); } +int run_event(struct run_event_state *state, const char *dump_dir_name, const char *event); + #ifdef __cplusplus } #endif |