PBHOpenDeny/PBHOpenRFDeny

This commit is contained in:
Kelvin Sherlock 2014-12-20 09:14:31 -05:00
parent 4bf57c6ce4
commit 148b13cdf1
3 changed files with 29 additions and 5 deletions

View File

@ -9,11 +9,13 @@ namespace OS
{
enum {
fsCurPerm = 0,
fsRdPerm = 1,
fsWrPerm = 2,
fsRdWrPerm = 3,
fsRdWrShPerm = 4,
fsCurPerm = 0x00,
fsRdPerm = 0x01,
fsWrPerm = 0x02,
fsRdWrPerm = 0x03,
fsRdWrShPerm = 0x04,
fsRdDenyPerm = 0x10,
fsWrDenyPerm = 0x20
};
enum {

View File

@ -396,6 +396,21 @@ namespace OS {
}
uint16_t PBHOpenDeny(uint32_t paramBlock)
{
// AccessParam.ioDenyModes short word matches
// up with the permission byte considering it's big-endian.
Log(" PBHOpenDeny\n");
return OS::Open(0xa000);
}
uint16_t PBHOpenRFDeny(uint32_t paramBlock)
{
Log(" PBHOpenRFDeny\n");
return OS::OpenRF(0xa000);
}
uint16_t FSDispatch(uint16_t trap)
{
@ -449,6 +464,12 @@ namespace OS {
case 0x001a:
return PBHOpenDF(paramBlock);
case 0x0038:
return PBHOpenDeny(paramBlock);
case 0x0039:
return PBHOpenRFDeny(paramBlock);
default:
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
selector);

View File

@ -470,6 +470,7 @@ namespace OS { namespace Internal {
if (filename.empty()) return MacOS::bdNamErr;
int access = 0;
ioPermission &= ~0x30; // drop deny read/write
switch(ioPermission)
{
case fsWrPerm: