mirror of
https://github.com/ksherlock/mpw.git
synced 2025-02-08 22:30:37 +00:00
improve mpw return errors (0x40000000)
This commit is contained in:
parent
7d10b0da5d
commit
53c42e1ee2
@ -22,6 +22,10 @@
|
|||||||
#include <toolbox/toolbox.h>
|
#include <toolbox/toolbox.h>
|
||||||
#include <toolbox/os.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
|
namespace MPW
|
||||||
@ -79,7 +83,7 @@ namespace MPW
|
|||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
// why the 0x40... ??
|
// return an errno.
|
||||||
d0 = 0x40000000 | errno_to_errno(errno);
|
d0 = 0x40000000 | errno_to_errno(errno);
|
||||||
f.error = -36; // ioErr ... whatever.
|
f.error = -36; // ioErr ... whatever.
|
||||||
f.cookie = 0;
|
f.cookie = 0;
|
||||||
|
@ -75,7 +75,7 @@ namespace MPW
|
|||||||
{
|
{
|
||||||
//f.count = 0;
|
//f.count = 0;
|
||||||
f.error = OS::ioErr; // ioErr
|
f.error = OS::ioErr; // ioErr
|
||||||
d0 = 0x40000000 | errno_to_errno(errno);
|
d0 = errno_to_errno(errno);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -140,7 +140,7 @@ namespace MPW
|
|||||||
{
|
{
|
||||||
//f.count = 0;
|
//f.count = 0;
|
||||||
f.error = -36; // ioErr
|
f.error = -36; // ioErr
|
||||||
d0 = 0x40000000 | errno_to_errno(errno);
|
d0 = errno_to_errno(errno);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@ namespace MPW
|
|||||||
|
|
||||||
if (fd < 0 || fd >= FDTable.size() || !FDTable[fd])
|
if (fd < 0 || fd >= FDTable.size() || !FDTable[fd])
|
||||||
{
|
{
|
||||||
d0 = kEINVAL; // | 0x40000000 ?
|
d0 = kEINVAL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user