mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 19:30:50 +00:00
updates.
This commit is contained in:
parent
93bb259471
commit
ec9e78c793
@ -260,6 +260,8 @@ namespace OS
|
||||
sname = FSSpecManager::ExpandPath(sname, ioDirID);
|
||||
}
|
||||
|
||||
Log(" open(%s, %02x, %02x)\n", sname.c_str(), resource, ioPermission);
|
||||
|
||||
auto fd = Internal::open_file(sname, resource, ioPermission);
|
||||
if (fd) memoryWriteWord(fd.value(), parm + _ioRefNum);
|
||||
d0 = fd.error();
|
||||
|
@ -111,7 +111,7 @@ namespace OS { namespace Internal {
|
||||
switch(ioPermission)
|
||||
{
|
||||
case fsWrPerm:
|
||||
oflag = O_WRONLY;
|
||||
oflag = O_RDWR;
|
||||
break;
|
||||
case fsRdWrPerm:
|
||||
case fsRdWrShPerm:
|
||||
|
@ -840,12 +840,12 @@ namespace Native {
|
||||
|
||||
macos_error err = noErr;
|
||||
|
||||
auto fd = native::open_fork(path, 0, O_CREAT | O_EXCL | O_WRONLY, 0666);
|
||||
auto fd = native::open_fork(path, 0, O_CREAT | O_EXCL | O_WRONLY);
|
||||
if ((err = fd.error())) {
|
||||
if (err != dupFNErr) return SetResError(err);
|
||||
}
|
||||
|
||||
fd = native::open_fork(path, 1, O_WRONLY, 0666);
|
||||
fd = native::open_fork(path, 1, O_WRONLY);
|
||||
if (fd.error()) return SetResError(macos_error_from_errno());
|
||||
|
||||
auto ff = std::move(fd).value();
|
||||
|
Loading…
Reference in New Issue
Block a user