summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-02-05 22:40:57 +0100
committerJim Meyering <meyering@redhat.com>2011-02-05 22:40:57 +0100
commit9f618068755b51d19b22c52bc4a2f8084946948e (patch)
treede378f0ac43363d6ab6e078721df36773b44c2b2 /NEWS
parent661413d8c3654e8418c5b5aab36bdba13296c8e1 (diff)
downloadcoreutils-9f618068755b51d19b22c52bc4a2f8084946948e.tar.xz
copy: don't let a failed lseek go undiagnosed
Upon failed lseek, sparse_copy_finalize would mistakenly return true. Admittedly, that is very unlikely, since that particular lseek is attempted only if the preceding call to sparse_copy induced a hole at EOF (via lseek on the destination FD). However, now that sparse_copy has an output parameter, N_READ, there is no longer any reason to call lseek (fd, 0, SEEK_CUR), so... * src/copy.c (sparse_copy_finalize): Remove the function. (copy_reg): Call ftruncate with n_read, rather than sparse_copy_finalize with its now-unnecessary lseek. Lasse Collin spotted the bug in sparse_copy_finalize.
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions