openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/stream.c
static rsRetVal CheckFileChange(strm_t* pThis)
{
    struct stat statName;
    DEFiRet;

    CHKiRet(strmSetCurrFName(pThis));
    if (stat((char*)pThis->pszCurrFName, &statName) == -1)
        ABORT_FINALIZE(RS_RET_IO_ERROR);
    DBGPRINTF(
        "CheckFileChange: stream/after deserialize checking for file change "
        "on '%s', inode %u/%u, size/currOffs %llu/%llu\n",
        pThis->pszCurrFName, (unsigned)pThis->inode, (unsigned)statName.st_ino,
        (long long unsigned)statName.st_size,
        (long long unsigned)pThis->iCurrOffs);
    if (pThis->inode != statName.st_ino || statName.st_size < pThis->iCurrOffs)
    {
        DBGPRINTF("stream: file %s has changed\n", pThis->pszCurrFName);
        pThis->iCurrOffs = 0;
    }
finalize_it:
    RETiRet;
}
/* This function checks if the actual file has changed and, if so, resets the
 * offset. This is support for monitoring files. It should be called after
 * deserializing the strm object and before doing any other operation on it
 * (most importantly not an open or seek!).
 */
This function checks if the actual file has changed and, if so, resets the
offset. This is support for monitoring files. It should be called after
deserializing the strm object and before doing any other operation on it
(most importantly not an open or seek!).
This function checks if the actual file has changed and if so resets the offset . This is support for monitoring files . It should be called after deserializing the strm object and before doing any other operation on it ( most importantly not an open or seek! ) .
static rsRetVal CheckFileChange(strm_t* pThis)
{
    struct stat statName;
    DEFiRet;
    CHKiRet(strmSetCurrFName(pThis));
    if (stat((char*)pThis->pszCurrFName, &statName) == -1)
        ABORT_FINALIZE(RS_RET_IO_ERROR);
    DBGPRINTF(
        "CheckFileChange: stream/after deserialize checking for file change "
        "on '%s', inode %u/%u, size/currOffs %llu/%llu\n",
        pThis->pszCurrFName, (unsigned)pThis->inode, (unsigned)statName.st_ino,
        (long long unsigned)statName.st_size,
        (long long unsigned)pThis->iCurrOffs);
    if (pThis->inode != statName.st_ino || statName.st_size < pThis->iCurrOffs)
    {
        DBGPRINTF("stream: file %s has changed\n", pThis->pszCurrFName);
        pThis->iCurrOffs = 0;
    }
finalize_it:
    RETiRet;
}
static rsRetVal CheckFileChange ( strm_t * pThis ) { struct stat statName ; DEFiRet ; CHKiRet ( strmSetCurrFName ( pThis ) ) ; if ( stat ( ( char * ) pThis -> pszCurrFName , & statName ) == -1 ) ABORT_FINALIZE ( RS_RET_IO_ERROR ) ; DBGPRINTF ( " " " \n " , pThis -> pszCurrFName , ( unsigned ) pThis -> inode , ( unsigned ) statName . st_ino , ( long long unsigned ) statName . st_size , ( long long unsigned ) pThis -> iCurrOffs ) ; if ( pThis -> inode != statName . st_ino || statName . st_size < pThis -> iCurrOffs ) { DBGPRINTF ( " \n " , pThis -> pszCurrFName ) ; pThis -> iCurrOffs = 0 ; } finalize_it : RETiRet ; }
This function checks if the actual file has changed and, if so, resets the
 offset.
This function checks if the actual file has changed and if so resets the offset .