fix read/write count adjustment

( -= bytes transferred)
This commit is contained in:
Kelvin Sherlock 2013-02-13 20:00:12 -05:00
parent 29fb14ffd2
commit ad9d856056

View File

@ -276,13 +276,13 @@ namespace {
if (size < 0)
{
f.count = 0;
//f.count = 0;
f.error = OS::ioErr; // ioErr
d0 = 0x40000000 | errno_to_errno(errno);
}
else
{
f.count = size;
f.count -= size;
f.error = 0;
}
@ -338,13 +338,14 @@ namespace {
if (size < 0)
{
f.count = 0;
//f.count = 0;
f.error = -36; // ioErr
d0 = 0x40000000 | errno_to_errno(errno);
}
else
{
f.count = size;
// this is, apparently, correct.
f.count -= size;
f.error = 0;
}