home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
sredird
/
telnetcpcd-1.09.tar.gz
/
telnetcpcd-1.09.tar
/
syslog_perror.c
< prev
next >
Wrap
C/C++ Source or Header
|
2003-08-12
|
429b
|
27 lines
/*
syslog_perror.c
Copyright (c) 2002,2003 Thomas J Pinkl <tom@pinkl.com>
Version 1.00 12/03/2001
*/
#include "telnetcpcd.h"
/*
write the error message for the current system error to
the syslog
*/
void syslog_perror(char *str)
{
extern int errno;
if (errno > 0) {
if ((str == NULL) || (*str == '\0')) {
syslog(LOG_ERR,"%s",strerror(errno));
} else {
syslog(LOG_ERR,"%s: %s",str,strerror(errno));
}
}
}