20 #ifndef LIBREPORT_INTERNAL_H_
21 #define LIBREPORT_INTERNAL_H_
39 #include <sys/socket.h>
42 #include <sys/types.h>
44 #include <arpa/inet.h>
51 #include <sys/param.h>
65 # define _(S) gettext(S)
75 extern char **environ;
76 #if defined(__GLIBC__) && __GLIBC__ < 2
77 int vdprintf(
int d,
const char *format, va_list ap);
81 #define NORETURN __attribute__ ((noreturn))
84 #define ERR_PTR ((void*)(uintptr_t)1)
87 #define ARRAY_SIZE(x) ((unsigned)(sizeof(x) / sizeof((x)[0])))
90 #define CREATE_PRIVATE_TICKET "ABRT_CREATE_PRIVATE_TICKET"
94 #include "event_config.h"
97 #include "run_event.h"
100 #include "libreport_types.h"
106 #define prefixcmp libreport_prefixcmp
107 int prefixcmp(
const char *str,
const char *prefix);
108 #define suffixcmp libreport_suffixcmp
109 int suffixcmp(
const char *str,
const char *suffix);
110 #define strtrim libreport_strtrim
111 char *strtrim(
char *str);
112 #define strtrimch libreport_strtrimch
113 char *strtrimch(
char *str,
int ch);
114 #define append_to_malloced_string libreport_append_to_malloced_string
115 char *append_to_malloced_string(
char *mstr,
const char *append);
116 #define skip_whitespace libreport_skip_whitespace
117 char* skip_whitespace(
const char *s);
118 #define skip_non_whitespace libreport_skip_non_whitespace
119 char* skip_non_whitespace(
const char *s);
121 #define overlapping_strcpy libreport_overlapping_strcpy
122 void overlapping_strcpy(
char *dst,
const char *src);
124 #define concat_path_file libreport_concat_path_file
125 char *concat_path_file(
const char *path,
const char *filename);
130 #define concat_path_basename libreport_concat_path_basename
131 char *concat_path_basename(
const char *path,
const char *filename);
134 #define xmalloc_fgets libreport_xmalloc_fgets
135 char *xmalloc_fgets(FILE *file);
137 #define xmalloc_fgetline libreport_xmalloc_fgetline
138 char *xmalloc_fgetline(FILE *file);
140 #define xmalloc_fopen_fgetline_fclose libreport_xmalloc_fopen_fgetline_fclose
141 char *xmalloc_fopen_fgetline_fclose(
const char *filename);
146 COPYFD_SPARSE = 1 << 0,
148 #define copyfd_eof libreport_copyfd_eof
149 off_t copyfd_eof(
int src_fd,
int dst_fd,
int flags);
150 #define copyfd_size libreport_copyfd_size
151 off_t copyfd_size(
int src_fd,
int dst_fd, off_t size,
int flags);
152 #define copyfd_exact_size libreport_copyfd_exact_size
153 void copyfd_exact_size(
int src_fd,
int dst_fd, off_t size);
154 #define copy_file libreport_copy_file
155 off_t copy_file(
const char *src_name,
const char *dst_name,
int mode);
156 #define copy_file_recursive libreport_copy_file_recursive
157 int copy_file_recursive(
const char *source,
const char *dest);
161 #define xread libreport_xread
162 void xread(
int fd,
void *buf,
size_t count);
163 #define safe_read libreport_safe_read
164 ssize_t safe_read(
int fd,
void *buf,
size_t count);
165 #define safe_write libreport_safe_write
166 ssize_t safe_write(
int fd,
const void *buf,
size_t count);
167 #define full_read libreport_full_read
168 ssize_t full_read(
int fd,
void *buf,
size_t count);
169 #define full_write libreport_full_write
170 ssize_t full_write(
int fd,
const void *buf,
size_t count);
171 #define full_write_str libreport_full_write_str
172 ssize_t full_write_str(
int fd,
const char *buf);
173 #define xmalloc_read libreport_xmalloc_read
174 void* xmalloc_read(
int fd,
size_t *maxsz_p);
175 #define xmalloc_open_read_close libreport_xmalloc_open_read_close
176 void* xmalloc_open_read_close(
const char *filename,
size_t *maxsz_p);
177 #define xmalloc_xopen_read_close libreport_xmalloc_xopen_read_close
178 void* xmalloc_xopen_read_close(
const char *filename,
size_t *maxsz_p);
182 #define encode_base64 libreport_encode_base64
183 char *encode_base64(
const void *src,
int length);
189 #define sanitize_utf8 libreport_sanitize_utf8
190 char *sanitize_utf8(
const char *src, uint32_t control_chars_to_sanitize);
192 SANITIZE_ALL = 0xffffffff,
193 SANITIZE_TAB = (1 << 9),
194 SANITIZE_LF = (1 << 10),
195 SANITIZE_CR = (1 << 13),
198 #define SHA1_RESULT_LEN (5 * 4)
205 #define sha1_begin libreport_sha1_begin
207 #define sha1_hash libreport_sha1_hash
208 void sha1_hash(
sha1_ctx_t *ctx,
const void *buffer,
size_t len);
209 #define sha1_end libreport_sha1_end
213 #define str_to_sha1 libreport_str_to_sha1
214 const uint8_t *str_to_sha1(uint8_t result[SHA1_RESULT_LEN],
const char *str);
215 #define str_to_sha1str libreport_str_to_sha1str
216 const char *str_to_sha1str(
char result[SHA1_RESULT_LEN*2 + 1],
const char *str);
219 #define xatou libreport_xatou
220 unsigned xatou(
const char *numstr);
221 #define xatoi libreport_xatoi
222 int xatoi(
const char *numstr);
230 #define xatoi_positive libreport_xatoi_positive
231 int xatoi_positive(
const char *numstr);
238 #define safe_waitpid libreport_safe_waitpid
239 pid_t safe_waitpid(pid_t pid,
int *wstat,
int options);
244 EXECFLG_INPUT = 1 << 0,
247 EXECFLG_OUTPUT = 1 << 1,
249 EXECFLG_INPUT_NUL = 1 << 2,
251 EXECFLG_OUTPUT_NUL = 1 << 3,
253 EXECFLG_ERR2OUT = 1 << 4,
255 EXECFLG_ERR_NUL = 1 << 5,
257 EXECFLG_QUIET = 1 << 6,
258 EXECFLG_SETGUID = 1 << 7,
259 EXECFLG_SETSID = 1 << 8,
260 EXECFLG_SETPGID = 1 << 9,
268 #define fork_execv_on_steroids libreport_fork_execv_on_steroids
269 pid_t fork_execv_on_steroids(
int flags,
277 #define run_in_shell_and_save_output libreport_run_in_shell_and_save_output
278 char *run_in_shell_and_save_output(
int flags,
285 #define is_in_string_list libreport_is_in_string_list
286 bool is_in_string_list(
const char *name,
char **v);
288 #define is_in_comma_separated_list libreport_is_in_comma_separated_list
289 bool is_in_comma_separated_list(
const char *value,
const char *list);
290 #define is_in_comma_separated_list_of_glob_patterns libreport_is_in_comma_separated_list_of_glob_patterns
291 bool is_in_comma_separated_list_of_glob_patterns(
const char *value,
const char *list);
295 #define glib_init libreport_glib_init
296 void glib_init(
void);
301 #define list_free_with_free libreport_list_free_with_free
302 void list_free_with_free(GList *list);
304 #define get_dirsize libreport_get_dirsize
305 double get_dirsize(
const char *pPath);
306 #define get_dirsize_find_largest_dir libreport_get_dirsize_find_largest_dir
307 double get_dirsize_find_largest_dir(
313 #define ndelay_on libreport_ndelay_on
314 int ndelay_on(
int fd);
315 #define ndelay_off libreport_ndelay_off
316 int ndelay_off(
int fd);
317 #define close_on_exec_on libreport_close_on_exec_on
318 int close_on_exec_on(
int fd);
320 #define xmalloc libreport_xmalloc
321 void* xmalloc(
size_t size);
322 #define xrealloc libreport_xrealloc
323 void* xrealloc(
void *ptr,
size_t size);
324 #define xzalloc libreport_xzalloc
325 void* xzalloc(
size_t size);
326 #define xstrdup libreport_xstrdup
327 char* xstrdup(
const char *s);
328 #define xstrndup libreport_xstrndup
329 char* xstrndup(
const char *s,
int n);
331 #define xpipe libreport_xpipe
332 void xpipe(
int filedes[2]);
333 #define xdup libreport_xdup
335 #define xdup2 libreport_xdup2
336 void xdup2(
int from,
int to);
337 #define xmove_fd libreport_xmove_fd
338 void xmove_fd(
int from,
int to);
340 #define xwrite libreport_xwrite
341 void xwrite(
int fd,
const void *buf,
size_t count);
342 #define xwrite_str libreport_xwrite_str
343 void xwrite_str(
int fd,
const char *str);
345 #define xlseek libreport_xlseek
346 off_t xlseek(
int fd, off_t offset,
int whence);
348 #define xchdir libreport_xchdir
349 void xchdir(
const char *path);
351 #define xvasprintf libreport_xvasprintf
352 char* xvasprintf(
const char *format, va_list p);
353 #define xasprintf libreport_xasprintf
354 char* xasprintf(
const char *format, ...);
356 #define xsetenv libreport_xsetenv
357 void xsetenv(
const char *key,
const char *value);
368 #define safe_unsetenv libreport_safe_unsetenv
369 void safe_unsetenv(
const char *var_val);
371 #define xsocket libreport_xsocket
372 int xsocket(
int domain,
int type,
int protocol);
373 #define xbind libreport_xbind
374 void xbind(
int sockfd,
struct sockaddr *my_addr, socklen_t addrlen);
375 #define xlisten libreport_xlisten
376 void xlisten(
int s,
int backlog);
377 #define xsendto libreport_xsendto
378 ssize_t xsendto(
int s,
const void *buf,
size_t len,
379 const struct sockaddr *to, socklen_t tolen);
381 #define xstat libreport_xstat
382 void xstat(
const char *name,
struct stat *stat_buf);
383 #define fstat_st_size_or_die libreport_fstat_st_size_or_die
384 off_t fstat_st_size_or_die(
int fd);
385 #define stat_st_size_or_die libreport_stat_st_size_or_die
386 off_t stat_st_size_or_die(
const char *filename);
388 #define xopen3 libreport_xopen3
389 int xopen3(
const char *pathname,
int flags,
int mode);
390 #define xopen libreport_xopen
391 int xopen(
const char *pathname,
int flags);
392 #define xunlink libreport_xunlink
393 void xunlink(
const char *pathname);
401 #define is_regular_file libreport_is_regular_file
402 int is_regular_file(
struct dirent *dent,
const char *dirname);
404 #define dot_or_dotdot libreport_dot_or_dotdot
405 bool dot_or_dotdot(
const char *filename);
406 #define last_char_is libreport_last_char_is
407 char *last_char_is(
const char *s,
int c);
409 #define string_to_bool libreport_string_to_bool
410 bool string_to_bool(
const char *s);
412 #define xseteuid libreport_xseteuid
413 void xseteuid(uid_t euid);
414 #define xsetegid libreport_xsetegid
415 void xsetegid(gid_t egid);
416 #define xsetreuid libreport_xsetreuid
417 void xsetreuid(uid_t ruid, uid_t euid);
418 #define xsetregid libreport_xsetregid
419 void xsetregid(gid_t rgid, gid_t egid);
423 #define bin2hex libreport_bin2hex
424 char* bin2hex(
char *dst,
const char *str,
int count);
426 #define hex2bin libreport_hex2bin
427 char* hex2bin(
char *dst,
const char *str,
int count);
432 LOGMODE_STDIO = (1 << 0),
433 LOGMODE_SYSLOG = (1 << 1),
434 LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO,
435 LOGMODE_CUSTOM = (1 << 2),
436 LOGMODE_JOURNAL = (1 << 3),
439 #define g_custom_logger libreport_g_custom_logger
440 extern void (*g_custom_logger)(
const char*);
441 #define msg_prefix libreport_msg_prefix
442 extern const char *msg_prefix;
443 #define msg_eol libreport_msg_eol
444 extern const char *msg_eol;
445 #define logmode libreport_logmode
447 #define xfunc_error_retval libreport_xfunc_error_retval
448 extern int xfunc_error_retval;
451 #define EXIT_CANCEL_BY_USER 69
452 #define EXIT_STOP_EVENT_RUN 70
454 #define set_xfunc_error_retval libreport_set_xfunc_error_retval
455 void set_xfunc_error_retval(
int retval);
458 #define g_verbose libreport_g_verbose
459 extern int g_verbose;
461 #define VERB1 if (g_verbose >= 1)
463 #define VERB2 if (g_verbose >= 2)
465 #define VERB3 if (g_verbose >= 3)
469 #define xfunc_die libreport_xfunc_die
470 void xfunc_die(
void) NORETURN;
472 #define die_out_of_memory libreport_die_out_of_memory
473 void die_out_of_memory(
void) NORETURN;
477 #define log(...) log_standard(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__)
478 #define log_debug(...) log_standard(LOG_DEBUG, __FILE__, __LINE__, __func__, __VA_ARGS__)
479 #define log_info(...) log_standard(LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__)
480 #define log_notice(...) log_standard(LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
481 #define log_warning(...) log_standard(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__)
482 #define log_error(...) log_standard(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__)
484 #define log_standard(level, file, line, func, ...) log_wrapper(level, __FILE__, __LINE__, __func__, false, false, __VA_ARGS__)
487 #define log_error_and_die(...) log_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, false, false,__VA_ARGS__)
488 #define log_perror(...) log_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, true, false, __VA_ARGS__)
489 #define log_perror_and_die(...) log_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, true, false, __VA_ARGS__)
491 #define error_msg(...) log_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, false, true, __VA_ARGS__)
492 #define perror_msg(...) log_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, true, true, __VA_ARGS__)
493 #define warn_msg(...) log_wrapper(LOG_WARNING, __FILE__, __LINE__, __func__, false, true, __VA_ARGS__)
494 #define pwarn_msg(...) log_wrapper(LOG_WARNING, __FILE__, __LINE__, __func__, true, true, __VA_ARGS__)
495 #define error_msg_and_die(...) log_and_die_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, false, true, __VA_ARGS__)
496 #define perror_msg_and_die(...) log_and_die_wrapper(LOG_ERR, __FILE__, __LINE__, __func__, true, true, __VA_ARGS__)
499 void log_wrapper(
int level,
504 bool use_custom_logger,
505 const char *format, ...) __attribute__ ((format (printf, 7,8)));
507 void log_and_die_wrapper(
int level,
512 bool use_custom_logger,
513 const
char *format, ...) __attribute__ ((noreturn, format (printf, 7,8)));
530 #define strbuf_new libreport_strbuf_new
531 struct strbuf *strbuf_new(
void);
538 #define strbuf_free libreport_strbuf_free
546 #define strbuf_free_nobuf libreport_strbuf_free_nobuf
553 #define strbuf_clear libreport_strbuf_clear
560 #define strbuf_append_char libreport_strbuf_append_char
567 #define strbuf_append_str libreport_strbuf_append_str
575 #define strbuf_prepend_str libreport_strbuf_prepend_str
583 #define strbuf_append_strf libreport_strbuf_append_strf
585 const char *format, ...);
591 #define strbuf_append_strfv libreport_strbuf_append_strfv
593 const char *format, va_list p);
600 #define strbuf_prepend_strf libreport_strbuf_prepend_strf
602 const char *format, ...);
608 #define strbuf_prepend_strfv libreport_strbuf_prepend_strfv
610 const char *format, va_list p);
617 #define get_cmdline libreport_get_cmdline
618 char* get_cmdline(pid_t pid);
619 #define get_environ libreport_get_environ
620 char* get_environ(pid_t pid);
625 #define iso_date_string libreport_iso_date_string
626 char *iso_date_string(
const time_t *pt);
627 #define LIBREPORT_ISO_DATE_STRING_SAMPLE "YYYY-MM-DD-hh:mm:ss"
630 MAKEDESC_SHOW_FILES = (1 << 0),
631 MAKEDESC_SHOW_MULTILINE = (1 << 1),
632 MAKEDESC_SHOW_ONLY_LIST = (1 << 2),
633 MAKEDESC_WHITELIST = (1 << 3),
635 MAKEDESC_SHOW_URLS = (1 << 4),
637 #define make_description libreport_make_description
638 char *make_description(problem_data_t *problem_data,
char **names_to_skip,
unsigned max_text_size,
unsigned desc_flags);
639 #define make_description_bz libreport_make_description_bz
640 char* make_description_bz(problem_data_t *problem_data,
unsigned max_text_size);
641 #define make_description_logger libreport_make_description_logger
642 char* make_description_logger(problem_data_t *problem_data,
unsigned max_text_size);
643 #define make_description_mailx libreport_make_description_mailx
644 char* make_description_mailx(problem_data_t *problem_data,
unsigned max_text_size);
647 #define OSINFO_ID "ID"
648 #define OSINFO_NAME "NAME"
649 #define OSINFO_VERSION_ID "VERSION_ID"
650 #define OSINFO_PRETTY_NAME "PRETTY_NAME"
661 #define parse_osinfo libreport_parse_osinfo
662 void parse_osinfo(
const char *osinfo_bytes, map_string_t *osinfo);
678 #define parse_osinfo_for_bz libreport_parse_osinfo_for_bz
679 void parse_osinfo_for_bz(map_string_t *osinfo,
char **product,
char **version);
695 #define parse_osinfo_for_rhts libreport_parse_osinfo_for_rhts
696 void parse_osinfo_for_rhts(map_string_t *osinfo,
char **product,
char **version);
698 #define parse_release_for_bz libreport_parse_release_for_bz
699 void parse_release_for_bz(
const char *pRelease,
char **product,
char **version);
700 #define parse_release_for_rhts libreport_parse_release_for_rhts
701 void parse_release_for_rhts(
const char *pRelease,
char **product,
char **version);
717 #define load_conf_file libreport_load_conf_file
718 bool load_conf_file(
const char *pPath, map_string_t *settings,
bool skipKeysWithoutValue);
720 #define load_conf_file_from_dirs libreport_load_conf_file_from_dirs
721 bool load_conf_file_from_dirs(
const char *base_name,
const char *
const *directories, map_string_t *settings,
bool skipKeysWithoutValue);
723 #define save_conf_file libreport_save_conf_file
724 bool save_conf_file(
const char *path, map_string_t *settings);
726 #define save_app_conf_file libreport_save_app_conf_file
727 bool save_app_conf_file(
const char* application_name, map_string_t *settings);
728 #define load_app_conf_file libreport_load_app_conf_file
729 bool load_app_conf_file(
const char *application_name, map_string_t *settings);
730 #define set_app_user_setting libreport_set_app_user_setting
731 void set_app_user_setting(map_string_t *settings,
const char *name,
const char *value);
732 #define get_app_user_setting libreport_get_app_user_setting
733 const char *get_app_user_setting(map_string_t *settings,
const char *name);
735 #define save_user_settings libreport_save_user_settings
736 bool save_user_settings();
737 #define load_user_settings libreport_load_user_settings
738 bool load_user_settings(
const char *application_name);
739 #define set_user_setting libreport_set_user_setting
740 void set_user_setting(
const char *name,
const char *value);
741 #define get_user_setting libreport_get_user_setting
742 const char *get_user_setting(
const char *name);
747 #define load_forbidden_words libreport_load_forbidden_words
748 GList *load_words_from_file(
const char *filename);
749 #define get_file_list libreport_get_file_list
750 GList *get_file_list(
const char *path,
const char *ext);
751 #define free_file_list libreport_free_file_list
752 void free_file_list(GList *filelist);
753 #define new_file_obj libreport_new_file_obj
754 file_obj_t *new_file_obj(
const char* fullpath,
const char* filename);
755 #define free_file_obj libreport_free_file_obj
757 #define load_workflow_config_data libreport_load_workflow_config_data
758 GHashTable *load_workflow_config_data(
const char* path);
759 #define parse_list libreport_parse_list
760 GList *parse_list(
const char* list);
763 int delete_dump_dir_possibly_using_abrtd(
const char *dump_dir_name);
767 #define steal_directory libreport_steal_directory
768 struct dump_dir *steal_directory(
const char *base_dir,
const char *dump_dir_name);
776 #define open_directory_for_writing libreport_open_directory_for_writing
777 struct dump_dir *open_directory_for_writing(
778 const char *dump_dir_name,
779 bool (*ask_continue)(
const char *,
const char *));
795 #define CD_MAX_TEXT_SIZE (8*1024*1024)
801 #define CD_TEXT_ATT_SIZE_BZ (4*1024)
803 #define CD_TEXT_ATT_SIZE_LOGGER (CD_MAX_TEXT_SIZE)
807 #define FILENAME_TIME "time"
808 #define FILENAME_LAST_OCCURRENCE "last_occurrence"
809 #define FILENAME_REASON "reason"
810 #define FILENAME_UID "uid"
818 #define FILENAME_ANALYZER "analyzer"
819 #define FILENAME_TYPE "type"
820 #define FILENAME_EXECUTABLE "executable"
821 #define FILENAME_PID "pid"
822 #define FILENAME_PWD "pwd"
823 #define FILENAME_ROOTDIR "rootdir"
824 #define FILENAME_BINARY "binary"
825 #define FILENAME_CMDLINE "cmdline"
826 #define FILENAME_COREDUMP "coredump"
827 #define FILENAME_CGROUP "cgroup"
828 #define FILENAME_BACKTRACE "backtrace"
829 #define FILENAME_MAPS "maps"
830 #define FILENAME_SMAPS "smaps"
831 #define FILENAME_PROC_PID_STATUS "proc_pid_status"
832 #define FILENAME_ENVIRON "environ"
833 #define FILENAME_LIMITS "limits"
834 #define FILENAME_OPEN_FDS "open_fds"
839 #define FILENAME_DUPHASH "duphash"
843 #define FILENAME_CRASH_FUNCTION "crash_function"
844 #define FILENAME_ARCHITECTURE "architecture"
845 #define FILENAME_KERNEL "kernel"
852 #define FILENAME_OS_INFO "os_info"
853 #define FILENAME_OS_INFO_IN_ROOTDIR "os_info_in_rootdir"
855 #define FILENAME_OS_RELEASE "os_release"
856 #define FILENAME_OS_RELEASE_IN_ROOTDIR "os_release_in_rootdir"
858 #define FILENAME_PACKAGE "package"
859 #define FILENAME_COMPONENT "component"
860 #define FILENAME_COMMENT "comment"
861 #define FILENAME_RATING "backtrace_rating"
862 #define FILENAME_HOSTNAME "hostname"
864 #define FILENAME_REMOTE "remote"
865 #define FILENAME_TAINTED "kernel_tainted"
866 #define FILENAME_TAINTED_SHORT "kernel_tainted_short"
867 #define FILENAME_TAINTED_LONG "kernel_tainted_long"
868 #define FILENAME_VMCORE "vmcore"
869 #define FILENAME_KERNEL_LOG "kernel_log"
872 #define FILENAME_DESCRIPTION "description"
878 #define FILENAME_UUID "uuid"
880 #define FILENAME_COUNT "count"
887 #define FILENAME_REPORTED_TO "reported_to"
888 #define FILENAME_EVENT_LOG "event_log"
894 #define FILENAME_NOT_REPORTABLE "not-reportable"
895 #define FILENAME_CORE_BACKTRACE "core_backtrace"
896 #define FILENAME_REMOTE_RESULT "remote_result"
897 #define FILENAME_PKG_EPOCH "pkg_epoch"
898 #define FILENAME_PKG_NAME "pkg_name"
899 #define FILENAME_PKG_VERSION "pkg_version"
900 #define FILENAME_PKG_RELEASE "pkg_release"
901 #define FILENAME_PKG_ARCH "pkg_arch"
902 #define FILENAME_USERNAME "username"
903 #define FILENAME_ABRT_VERSION "abrt_version"
904 #define FILENAME_EXPLOITABLE "exploitable"
907 #define CD_DUMPDIR "Directory"
909 #define cmp_problem_data libreport_cmp_problem_data
910 gint cmp_problem_data(gconstpointer a, gconstpointer b, gpointer filename);
921 EVENT_LOG_HIGH_WATERMARK = 30 * 1024,
922 EVENT_LOG_LOW_WATERMARK = 20 * 1024,
925 #define log_problem_data libreport_log_problem_data
926 void log_problem_data(problem_data_t *problem_data,
const char *pfx);
929 const char *abrt_init(
char **argv);
930 #define export_abrt_envvars libreport_export_abrt_envvars
931 void export_abrt_envvars(
int pfx);
932 #define g_progname libreport_g_progname
933 extern const char *g_progname;
935 enum parse_opt_type {
946 enum parse_opt_type type;
948 const char *long_name;
961 #define OPT_END() { OPTION_END }
962 #define OPT_GROUP(h) { OPTION_GROUP, 0, NULL, NULL, NULL, (h) }
963 #define OPT_BOOL( s, l, v, h) { OPTION_BOOL , (s), (l), (v), NULL , (h) }
964 #define OPT_INTEGER( s, l, v, h) { OPTION_INTEGER , (s), (l), (v), "NUM", (h) }
965 #define OPT_STRING( s, l, v, a, h) { OPTION_STRING , (s), (l), (v), (a) , (h) }
966 #define OPT_OPTSTRING(s, l, v, a, h) { OPTION_OPTSTRING, (s), (l), (v), (a) , (h) }
967 #define OPT_LIST( s, l, v, a, h) { OPTION_LIST , (s), (l), (v), (a) , (h) }
969 #define OPT__VERBOSE(v) OPT_BOOL('v', "verbose", (v), _("Be verbose"))
970 #define OPT__DUMP_DIR(v) OPT_STRING('d', "problem-dir", (v), "DIR", _("Problem directory"))
972 #define parse_opts libreport_parse_opts
973 unsigned parse_opts(
int argc,
char **argv,
const struct options *opt,
976 #define show_usage_and_die libreport_show_usage_and_die
977 void show_usage_and_die(
const char *usage,
const struct options *opt) NORETURN;
982 struct abrt_post_state;