* fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
non-error return from lseek.
This commit is contained in:
parent
a0922fcb04
commit
ffa6849093
@ -1,3 +1,8 @@
|
|||||||
|
2006-08-20 Hideki Iwamoto <h-iwamoto@kit.hi-ho.ne.jp>
|
||||||
|
|
||||||
|
* fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
|
||||||
|
non-error return from lseek.
|
||||||
|
|
||||||
2006-08-17 Corinna Vinschen <corinna@vinschen.de>
|
2006-08-17 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_serial.cc (raw_read): Evaluate minchars taking the
|
* fhandler_serial.cc (raw_read): Evaluate minchars taking the
|
||||||
|
@ -1216,7 +1216,7 @@ fhandler_disk_file::pread (void *buf, size_t count, _off64_t offset)
|
|||||||
{
|
{
|
||||||
size_t tmp_count = count;
|
size_t tmp_count = count;
|
||||||
read (buf, tmp_count);
|
read (buf, tmp_count);
|
||||||
if (lseek (curpos, SEEK_SET) == 0)
|
if (lseek (curpos, SEEK_SET) >= 0)
|
||||||
res = (ssize_t) tmp_count;
|
res = (ssize_t) tmp_count;
|
||||||
else
|
else
|
||||||
res = -1;
|
res = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user