diff --git a/mpw/mpw_access.cpp b/mpw/mpw_access.cpp index 2bf253f..209d39f 100644 --- a/mpw/mpw_access.cpp +++ b/mpw/mpw_access.cpp @@ -22,6 +22,10 @@ #include #include +/* + * 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; diff --git a/mpw/mpw_io.cpp b/mpw/mpw_io.cpp index dd3113a..4469903 100644 --- a/mpw/mpw_io.cpp +++ b/mpw/mpw_io.cpp @@ -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 { diff --git a/mpw/mpw_ioctl.cpp b/mpw/mpw_ioctl.cpp index 90a9d7e..07841d1 100644 --- a/mpw/mpw_ioctl.cpp +++ b/mpw/mpw_ioctl.cpp @@ -48,7 +48,7 @@ namespace MPW if (fd < 0 || fd >= FDTable.size() || !FDTable[fd]) { - d0 = kEINVAL; // | 0x40000000 ? + d0 = kEINVAL; } else {