END_TABLE
};
+#if 0 /* should this be hooked in somewhere? */
static struct str_table sigstrap_code_table[] = {
#ifdef TRAP_BRKPT
DEFINE_ENTRY(TRAP_BRKPT)
#endif
END_TABLE
};
+#endif
static struct str_table sigcld_code_table[] = {
#ifdef CLD_EXITED
END_TABLE
};
+#if 0 /* should this be hooked in somewhere? */
static struct str_table sigpoll_code_table[] = {
#ifdef POLL_IN
DEFINE_ENTRY(POLL_IN)
#endif
END_TABLE
};
+#endif
static const char *lookup_table(int num, struct str_table *table)
{
return buf;
}
-static void die_signal_handler(int signum, siginfo_t *siginfo, void *context)
+static void die_signal_handler(int signum, siginfo_t *siginfo,
+ void *context EXT2FS_ATTR((unused)))
{
- void *stack_syms[32];
- int frames;
const char *cp;
fprintf(stderr, "Signal (%d) %s ", signum,
fprintf(stderr, "fault addr=%p", siginfo->si_addr);
fprintf(stderr, "\n");
-#ifdef HAVE_BACKTRACE
- frames = backtrace(stack_syms, 32);
- backtrace_symbols_fd(stack_syms, frames, 2);
+#if defined(HAVE_BACKTRACE) && !defined(DISABLE_BACKTRACE)
+ {
+ void *stack_syms[32];
+ int frames;
+
+ frames = backtrace(stack_syms, 32);
+ backtrace_symbols_fd(stack_syms, frames, 2);
+ }
#endif
exit(FSCK_ERROR);
}