Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/strsignal.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 434 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 /*
2 * strsignal.c
3 */
4
5 #include <string.h>
6 #include <signal.h>
7 #include <stdio.h>
8
9 char *strsignal(int sig)
10 {
11 static char buf[64];
12
13 if ((unsigned)sig < _NSIG && sys_siglist[sig])
14 return (char *)sys_siglist[sig];
15
16 #ifdef SIGRTMIN
17 if (sig >= SIGRTMIN && sig <= SIGRTMAX) {
18 snprintf(buf, sizeof buf, "Real-time signal %d",
19 sig - SIGRTMIN);
20 return buf;
21 }
22 #endif
23
24 snprintf(buf, sizeof buf, "Signal %d", sig);
25 return buf;
26 }