improve mpw return errors (0x40000000)

This commit is contained in:
Kelvin Sherlock 2013-02-17 12:25:20 -05:00
parent 7d10b0da5d
commit 53c42e1ee2
3 changed files with 8 additions and 4 deletions

View File

@ -22,6 +22,10 @@
#include <toolbox/toolbox.h>
#include <toolbox/os.h>
/*
* access return errors are |= 0x40000000. Not entirely sure why...
* may return an errno or an oserr, too, apparently.
*/
namespace MPW
@ -79,7 +83,7 @@ namespace MPW
if (fd < 0)
{
// why the 0x40... ??
// return an errno.
d0 = 0x40000000 | errno_to_errno(errno);
f.error = -36; // ioErr ... whatever.
f.cookie = 0;

View File

@ -75,7 +75,7 @@ namespace MPW
{
//f.count = 0;
f.error = OS::ioErr; // ioErr
d0 = 0x40000000 | errno_to_errno(errno);
d0 = errno_to_errno(errno);
}
else
{
@ -140,7 +140,7 @@ namespace MPW
{
//f.count = 0;
f.error = -36; // ioErr
d0 = 0x40000000 | errno_to_errno(errno);
d0 = errno_to_errno(errno);
}
else
{

View File

@ -48,7 +48,7 @@ namespace MPW
if (fd < 0 || fd >= FDTable.size() || !FDTable[fd])
{
d0 = kEINVAL; // | 0x40000000 ?
d0 = kEINVAL;
}
else
{