diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-06 15:44:41 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-06 15:44:41 +0100 |
commit | f28b14412ce82bf0787274da87990b06649aa5a5 (patch) | |
tree | e566fa54cfba733557449762288d56b5c40052fb /inc/abrtlib.h | |
parent | c5e7deae4b4835e5e29d9421042f23ec19bbfc86 (diff) | |
download | abrt-f28b14412ce82bf0787274da87990b06649aa5a5.tar.gz abrt-f28b14412ce82bf0787274da87990b06649aa5a5.tar.xz abrt-f28b14412ce82bf0787274da87990b06649aa5a5.zip |
pass old pattern to ccpp hook and use it
abrtd:
instead of
"|/usr/libexec/abrt-ccpp-hook DEBUG_DUMPS_DIR %p %s %u %c",
sets coredump handler to
"|/usr/libexec/abrt-ccpp-hook DEBUG_DUMPS_DIR %s %c %p %u %g %t %h %e OLD_PATTERN"
abrt-ccpp-hook:
expands OLD_PATTERN using values of %s %c %p %u %g %t %h %e
and uses it as a name of "compat coredump".
Patch has a feature which prevents usage of kernel-truncated
OLD_PATTERN: it is passed as hex string *with terminating NUL*
(encoded as 00). If ccpp hook doesn't see 00, it refuses to use
OLD_PATTERN and uses string "core" instead.
Run tested. On a new kernel, passes up to 27 char long old pattern.
Longer patterns are still truncated.
This may be improved in future kernels.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'inc/abrtlib.h')
-rw-r--r-- | inc/abrtlib.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/inc/abrtlib.h b/inc/abrtlib.h index fdf22643..0c36f268 100644 --- a/inc/abrtlib.h +++ b/inc/abrtlib.h @@ -218,6 +218,17 @@ char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa); /* Random utility functions */ +#ifdef __cplusplus +extern "C" { +#endif +/* Emit a string of hex representation of bytes */ +char* bin2hex(char *dst, const char *str, int count); +/* Convert "xxxxxxxx" hex string to binary, no more than COUNT bytes */ +char* hex2bin(char *dst, const char *str, int count); +#ifdef __cplusplus +} +#endif + /* Returns command line of running program. * Caller is responsible to free() the returned value. * If the pid is not valid or command line can not be obtained, |