openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsync/3.1.3-r0/rsync-3.1.3/fileio.c
int skip_matched(int fd, OFF_T offset, const char* buf, int len)
{
    OFF_T pos;

    if (sparse_files > 0)
    {
        if (write_file(fd, 1, offset, buf, len) != len)
            return -1;
        return 0;
    }

    if (flush_write_file(fd) < 0)
        return -1;

    if ((pos = do_lseek(fd, len, SEEK_CUR)) != offset + len)
    {
        rsyserr(FERROR_XFER, errno, "lseek returned %s, not %s", big_num(pos),
                big_num(offset));
        return -1;
    }

    return 0;
}
/* An in-place update found identical data at an identical location. We either
 * just seek past it, or (for an in-place sparse update), we give the data to
 * the sparse processor with the use_seek flag set. */
An in-place update found identical data at an identical location. We either
just seek past it, or (for an in-place sparse update), we give the data to
the sparse processor with the use_seek flag set.
An in - place update found identical data at an identical location . We either just seek past it or ( for an in - place sparse update ) we give the data to the sparse processor with the use_seek flag set .
int skip_matched(int fd, OFF_T offset, const char* buf, int len)
{
    OFF_T pos;
    if (sparse_files > 0)
    {
        if (write_file(fd, 1, offset, buf, len) != len)
            return -1;
        return 0;
    }
    if (flush_write_file(fd) < 0)
        return -1;
    if ((pos = do_lseek(fd, len, SEEK_CUR)) != offset + len)
    {
        rsyserr(FERROR_XFER, errno, "lseek returned %s, not %s", big_num(pos),
                big_num(offset));
        return -1;
    }
    return 0;
}
int skip_matched ( int fd , OFF_T offset , const char * buf , int len ) { OFF_T pos ; if ( sparse_files > 0 ) { if ( write_file ( fd , 1 , offset , buf , len ) != len ) return -1 ; return 0 ; } if ( flush_write_file ( fd ) < 0 ) return -1 ; if ( ( pos = do_lseek ( fd , len , SEEK_CUR ) ) != offset + len ) { rsyserr ( FERROR_XFER , errno , " " , big_num ( pos ) , big_num ( offset ) ) ; return -1 ; } return 0 ; }
An in-place update found identical data at an identical location.
An in - place update found identical data at an identical location .