mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-23 14:18:17 -04:00
Improved do_lseek()'s failure message.
This commit is contained in:
1 parent
1a8e5c97eb
commit
705de51a73
1 file changed
+5
-2
@@ -219,8 +219,11 @@ char *map_ptr(struct map_struct *map, OFF_T offset, int32 len)
|
||||
exit_cleanup(RERR_FILEIO);
|
||||
} 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");
|
||||
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);
|
||||
}
|
||||
map->p_fd_offset = read_start;
|
||||
|
||||
Reference in new issue
Block a user