diff options
author | Geoff Levand <geoff@infradead.org> | 2011-11-12 13:59:18 -0800 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2011-11-12 14:05:31 -0800 |
commit | c75e362781057bc982799d300eebfd47417ad23e (patch) | |
tree | a8f1b22376d896d165f5c8bb7c0c3c7d3e81e0e9 /lib/talloc | |
parent | f5d6bf0af6aa5e6f1d51e00a617910ddfb76e32c (diff) | |
download | petitboot-c75e362781057bc982799d300eebfd47417ad23e.zip petitboot-c75e362781057bc982799d300eebfd47417ad23e.tar.gz |
Add custom TALLOC_ABORT
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'lib/talloc')
-rw-r--r-- | lib/talloc/talloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c index 95a0a6a..dd10893 100644 --- a/lib/talloc/talloc.c +++ b/lib/talloc/talloc.c @@ -41,6 +41,13 @@ #include <stdlib.h> #include <string.h> +#if !defined(NDEBUG) +#include <assert.h> +#define TALLOC_ABORT(reason) do{ \ + fprintf(stderr, "%s: name: %s\n", __func__, tc->name); \ + assert(0 && reason);} while (0) +#endif + #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif |