Whamcloud - gitweb
build: quiet build warnings for "gcc -Wall"
[tools/e2fsprogs.git] / e2fsck / sigcatcher.c
index 3b8d582..e3925f1 100644 (file)
@@ -132,15 +132,33 @@ static struct str_table sig_table[] = {
 };
 
 static struct str_table generic_code_table[] = {
+#ifdef SI_ASYNCNL
        DEFINE_ENTRY(SI_ASYNCNL)
+#endif
+#ifdef SI_TKILL
        DEFINE_ENTRY(SI_TKILL)
+#endif
+#ifdef SI_SIGIO
        DEFINE_ENTRY(SI_SIGIO)
+#endif
+#ifdef SI_ASYNCIO
        DEFINE_ENTRY(SI_ASYNCIO)
+#endif
+#ifdef SI_MESGQ
        DEFINE_ENTRY(SI_MESGQ)
+#endif
+#ifdef SI_TIMER
        DEFINE_ENTRY(SI_TIMER)
+#endif
+#ifdef SI_QUEUE
        DEFINE_ENTRY(SI_QUEUE)
+#endif
+#ifdef SI_USER
        DEFINE_ENTRY(SI_USER)
+#endif
+#ifdef SI_KERNEL
        DEFINE_ENTRY(SI_KERNEL)
+#endif
        END_TABLE
 };
 
@@ -233,6 +251,7 @@ static struct str_table sigbus_code_table[] = {
        END_TABLE
 };
 
+#if 0 /* should this be hooked in somewhere? */
 static struct str_table sigstrap_code_table[] = {
 #ifdef TRAP_BRKPT
        DEFINE_ENTRY(TRAP_BRKPT)
@@ -242,6 +261,7 @@ static struct str_table sigstrap_code_table[] = {
 #endif
        END_TABLE
 };
+#endif
 
 static struct str_table sigcld_code_table[] = {
 #ifdef CLD_EXITED
@@ -265,6 +285,7 @@ static struct str_table sigcld_code_table[] = {
        END_TABLE
 };
 
+#if 0 /* should this be hooked in somewhere? */
 static struct str_table sigpoll_code_table[] = {
 #ifdef POLL_IN
        DEFINE_ENTRY(POLL_IN)
@@ -286,6 +307,7 @@ static struct str_table sigpoll_code_table[] = {
 #endif
        END_TABLE
 };
+#endif
 
 static const char *lookup_table(int num, struct str_table *table)
 {
@@ -338,7 +360,7 @@ static void die_signal_handler(int signum, siginfo_t *siginfo, void *context)
               fprintf(stderr, "si_code=%s ",
                       lookup_table_fallback(siginfo->si_code,
                                             sigbus_code_table));
-       else if (signum == SIGCLD)
+       else if (signum == SIGCHLD)
               fprintf(stderr, "si_code=%s ",
                       lookup_table_fallback(siginfo->si_code,
                                             sigcld_code_table));
@@ -369,6 +391,7 @@ void sigcatcher_setup(void)
        sigaction(SIGILL, &sa, 0);
        sigaction(SIGBUS, &sa, 0);
        sigaction(SIGSEGV, &sa, 0);
+       sigaction(SIGABRT, &sa, 0);
 }