I'm sorry for a long reply. The exact code is
Code:
errno = 0;
if ((*length = read (PINPUT,Pbuffer,sizeof(PKOPF))) == -1 && errno != EINTR)
FEHLER(SYS_FEHLER_RTC, 0)
The definition of FEHLER is
Code:
#define FEHLER(rtx,p)\
{int s_errno=errno;\
sprintf (Error_lab, "%s[%d]", __FILE__, __LINE__);\
if (0 == p)\
sprintf (Error_msg, "Msg code : %d (errno=%d)", rtx, s_errno);\
else\
sprintf (Error_msg, "Msg text : %s - Msg code : %d (errno=%d)", p, rtx, s_errno);\
l_log(Error_lab, Error_msg);\
errno=s_errno;\
goto end_proc;}
And SYS_FEHLER_RTC is just a constant
Code:
#define SYS_FEHLER_RTC 101
I have replaced FEHLER(SYS_FEHLER_RTC, 0) with FEHLER(SYS_FEHLER_RTC, strerror(errno)) for investigation purposes. But it can change errno itself. Originally it was printed "Msg code : 101 (errno=0)" in a log file. Now with my changes it prints "Msg text : Success - Msg code : 101 (errno=0)".