Discovery with wait an select ist ready...
FossilOrigin-Name: 115fa489fbb4aa197e8390d40abcea80a8d4f954fecab348ce2862d2a20523c2
This commit is contained in:
20
src/cw/log_errno.c
Normal file
20
src/cw/log_errno.c
Normal file
@ -0,0 +1,20 @@
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "log.h"
|
||||
|
||||
void cw_log_errno(char * format, ...)
|
||||
{
|
||||
char str[2048];
|
||||
int err=errno;
|
||||
|
||||
va_list args;
|
||||
va_start(args,format);
|
||||
vsprintf(str,format,args);
|
||||
va_end(args);
|
||||
|
||||
cw_log(LOG_ERR,"%s: %s",str,strerror(err));
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user