Start of the changes to remove synchronous VFS read.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
}
#else /* HAVE_PREAD */
- off_t curr;
- int lerrno;
-
- curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
- if (curr == -1 && errno == ESPIPE) {
- /* Maintain the fiction that pipes can be seeked (sought?) on. */
- result = SMB_VFS_READ(fsp, data, n);
- fsp->fh->pos = 0;
- return result;
- }
-
- if (SMB_VFS_LSEEK(fsp, offset, SEEK_SET) == -1) {
- return -1;
- }
-
- errno = 0;
- result = SMB_VFS_READ(fsp, data, n);
- lerrno = errno;
-
- SMB_VFS_LSEEK(fsp, curr, SEEK_SET);
- errno = lerrno;
-
+ errno = ENOSYS;
+ result = -1;
#endif /* HAVE_PREAD */
return result;