Initialize lists of signals using C99 designators

Reviewed by:	jilles
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D7601
This commit is contained in:
Brooks Davis 2016-09-02 00:16:19 +00:00
parent 22536e1556
commit 466522c3ac

View File

@ -36,72 +36,72 @@ __FBSDID("$FreeBSD$");
#include <signal.h> #include <signal.h>
const char *const sys_signame[NSIG] = { const char *const sys_signame[NSIG] = {
"Signal 0", [0] = "Signal 0",
"HUP", /* SIGHUP */ [SIGHUP] = "HUP",
"INT", /* SIGINT */ [SIGINT] = "INT",
"QUIT", /* SIGQUIT */ [SIGQUIT] = "QUIT",
"ILL", /* SIGILL */ [SIGILL] = "ILL",
"TRAP", /* SIGTRAP */ [SIGTRAP] = "TRAP",
"ABRT", /* SIGABRT */ [SIGABRT] = "ABRT",
"EMT", /* SIGEMT */ [SIGEMT] = "EMT",
"FPE", /* SIGFPE */ [SIGFPE] = "FPE",
"KILL", /* SIGKILL */ [SIGKILL] = "KILL",
"BUS", /* SIGBUS */ [SIGBUS] = "BUS",
"SEGV", /* SIGSEGV */ [SIGSEGV] = "SEGV",
"SYS", /* SIGSYS */ [SIGSYS] = "SYS",
"PIPE", /* SIGPIPE */ [SIGPIPE] = "PIPE",
"ALRM", /* SIGALRM */ [SIGALRM] = "ALRM",
"TERM", /* SIGTERM */ [SIGTERM] = "TERM",
"URG", /* SIGURG */ [SIGURG] = "URG",
"STOP", /* SIGSTOP */ [SIGSTOP] = "STOP",
"TSTP", /* SIGTSTP */ [SIGTSTP] = "TSTP",
"CONT", /* SIGCONT */ [SIGCONT] = "CONT",
"CHLD", /* SIGCHLD */ [SIGCHLD] = "CHLD",
"TTIN", /* SIGTTIN */ [SIGTTIN] = "TTIN",
"TTOU", /* SIGTTOU */ [SIGTTOU] = "TTOU",
"IO", /* SIGIO */ [SIGIO] = "IO",
"XCPU", /* SIGXCPU */ [SIGXCPU] = "XCPU",
"XFSZ", /* SIGXFSZ */ [SIGXFSZ] = "XFSZ",
"VTALRM", /* SIGVTALRM */ [SIGVTALRM] = "VTALRM",
"PROF", /* SIGPROF */ [SIGPROF] = "PROF",
"WINCH", /* SIGWINCH */ [SIGWINCH] = "WINCH",
"INFO", /* SIGINFO */ [SIGINFO] = "INFO",
"USR1", /* SIGUSR1 */ [SIGUSR1] = "USR1",
"USR2" /* SIGUSR2 */ [SIGUSR2] = "USR2",
}; };
const char *const sys_siglist[NSIG] = { const char *const sys_siglist[NSIG] = {
"Signal 0", [0] = "Signal 0",
"Hangup", /* SIGHUP */ [SIGHUP] = "Hangup",
"Interrupt", /* SIGINT */ [SIGINT] = "Interrupt",
"Quit", /* SIGQUIT */ [SIGQUIT] = "Quit",
"Illegal instruction", /* SIGILL */ [SIGILL] = "Illegal instruction",
"Trace/BPT trap", /* SIGTRAP */ [SIGTRAP] = "Trace/BPT trap",
"Abort trap", /* SIGABRT */ [SIGABRT] = "Abort trap",
"EMT trap", /* SIGEMT */ [SIGEMT] = "EMT trap",
"Floating point exception", /* SIGFPE */ [SIGFPE] = "Floating point exception",
"Killed", /* SIGKILL */ [SIGKILL] = "Killed",
"Bus error", /* SIGBUS */ [SIGBUS] = "Bus error",
"Segmentation fault", /* SIGSEGV */ [SIGSEGV] = "Segmentation fault",
"Bad system call", /* SIGSYS */ [SIGSYS] = "Bad system call",
"Broken pipe", /* SIGPIPE */ [SIGPIPE] = "Broken pipe",
"Alarm clock", /* SIGALRM */ [SIGALRM] = "Alarm clock",
"Terminated", /* SIGTERM */ [SIGTERM] = "Terminated",
"Urgent I/O condition", /* SIGURG */ [SIGURG] = "Urgent I/O condition",
"Suspended (signal)", /* SIGSTOP */ [SIGSTOP] = "Suspended (signal)",
"Suspended", /* SIGTSTP */ [SIGTSTP] = "Suspended",
"Continued", /* SIGCONT */ [SIGCONT] = "Continued",
"Child exited", /* SIGCHLD */ [SIGCHLD] = "Child exited",
"Stopped (tty input)", /* SIGTTIN */ [SIGTTIN] = "Stopped (tty input)",
"Stopped (tty output)", /* SIGTTOU */ [SIGTTOU] = "Stopped (tty output)",
"I/O possible", /* SIGIO */ [SIGIO] = "I/O possible",
"Cputime limit exceeded", /* SIGXCPU */ [SIGXCPU] = "Cputime limit exceeded",
"Filesize limit exceeded", /* SIGXFSZ */ [SIGXFSZ] = "Filesize limit exceeded",
"Virtual timer expired", /* SIGVTALRM */ [SIGVTALRM] = "Virtual timer expired",
"Profiling timer expired", /* SIGPROF */ [SIGPROF] = "Profiling timer expired",
"Window size changes", /* SIGWINCH */ [SIGWINCH] = "Window size changes",
"Information request", /* SIGINFO */ [SIGINFO] = "Information request",
"User defined signal 1", /* SIGUSR1 */ [SIGUSR1] = "User defined signal 1",
"User defined signal 2" /* SIGUSR2 */ [SIGUSR2] = "User defined signal 2",
}; };
const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]); const int sys_nsig = sizeof(sys_siglist) / sizeof(sys_siglist[0]);