- rprintf(FINFO,"Warning: unexpected read size of %d in map_ptr\n", read_size);
- } else {
- if (map->p_fd_offset != read_start) {
- if (do_lseek(map->fd,read_start,SEEK_SET) != read_start) {
- rprintf(FERROR,"lseek failed in map_ptr\n");
- exit_cleanup(RERR_FILEIO);
- }
- map->p_fd_offset = read_start;
+ rprintf(FERROR, "invalid read_size of %ld in map_ptr\n",
+ (long)read_size);
+ exit_cleanup(RERR_FILEIO);
+ }
+
+ if (map->p_fd_offset != read_start) {
+ OFF_T ret = do_lseek(map->fd, read_start, SEEK_SET);
+ if (ret != read_start) {
+ rsyserr(FERROR, errno, "lseek returned %.0f, not %.0f",
+ (double)ret, (double)read_start);
+ exit_cleanup(RERR_FILEIO);