Пример #1
0
static off64_t lseek64x(int fd,
                        off64_t offset,
                        int whence,
                        off64_t (* f)(int, off64_t, int))
{
        off64_t         ret;
        
        /*
         * We have left the definitions of the smbw_ functions undefined,
         * because types such as off_t can differ in meaning betweent his
         * function and smbw.c et al.  Functions that return other than an
         * integer value, however, MUST have their return value defined.
         */
        off64_t         smbw_lseek();
        
	if (smbw_fd(fd))
		ret = smbw_lseek(fd, offset, whence);
        else
                ret = (* f)(fd, offset, whence);
        if (smbw_debug)
        {
                printf("lseek64x(%d, 0x%llx) returned 0x%llx\n",
                       fd,
                       (unsigned long long) offset,
                       (unsigned long long) ret);
        }
        return ret;
}
Пример #2
0
off_t lseek(int fd, off_t offset, int whence)
{
    if (smbw_fd(fd)) {
        return smbw_lseek(fd, offset, whence);
    }

    return real_lseek(fd, offset, whence);
}