mirror of
https://github.com/ksherlock/mpw.git
synced 2025-05-17 18:38:16 +00:00
PBHOpenDeny/PBHOpenRFDeny
This commit is contained in:
parent
4bf57c6ce4
commit
148b13cdf1
12
toolbox/os.h
12
toolbox/os.h
@ -9,11 +9,13 @@ namespace OS
|
|||||||
{
|
{
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
fsCurPerm = 0,
|
fsCurPerm = 0x00,
|
||||||
fsRdPerm = 1,
|
fsRdPerm = 0x01,
|
||||||
fsWrPerm = 2,
|
fsWrPerm = 0x02,
|
||||||
fsRdWrPerm = 3,
|
fsRdWrPerm = 0x03,
|
||||||
fsRdWrShPerm = 4,
|
fsRdWrShPerm = 0x04,
|
||||||
|
fsRdDenyPerm = 0x10,
|
||||||
|
fsWrDenyPerm = 0x20
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -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)
|
uint16_t FSDispatch(uint16_t trap)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -449,6 +464,12 @@ namespace OS {
|
|||||||
case 0x001a:
|
case 0x001a:
|
||||||
return PBHOpenDF(paramBlock);
|
return PBHOpenDF(paramBlock);
|
||||||
|
|
||||||
|
case 0x0038:
|
||||||
|
return PBHOpenDeny(paramBlock);
|
||||||
|
|
||||||
|
case 0x0039:
|
||||||
|
return PBHOpenRFDeny(paramBlock);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
|
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
|
||||||
selector);
|
selector);
|
||||||
|
@ -470,6 +470,7 @@ namespace OS { namespace Internal {
|
|||||||
if (filename.empty()) return MacOS::bdNamErr;
|
if (filename.empty()) return MacOS::bdNamErr;
|
||||||
|
|
||||||
int access = 0;
|
int access = 0;
|
||||||
|
ioPermission &= ~0x30; // drop deny read/write
|
||||||
switch(ioPermission)
|
switch(ioPermission)
|
||||||
{
|
{
|
||||||
case fsWrPerm:
|
case fsWrPerm:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user