Mistake in original checkin - fix from pedemont - was causing MAJOR OS/2 runtime bustage git-svn-id: svn://10.0.0.236/trunk@117461 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
82539b938a
commit
77151f0c92
@ -67,14 +67,16 @@ FILE* mork_fileopen(const char* name, const char* mode)
|
||||
{
|
||||
int access = O_RDWR;
|
||||
int descriptor;
|
||||
int pmode = 0;
|
||||
|
||||
/* Only possible options are wb+ and rb+ */
|
||||
MORK_ASSERT((mode[0] == 'w' || mode[0] == 'r') && (mode[1] == 'b') && (mode[2] == '+'));
|
||||
if (mode[0] == 'w') {
|
||||
access |= (O_TRUNC | O_CREAT);
|
||||
pmode = S_IREAD | S_IWRITE;
|
||||
}
|
||||
|
||||
descriptor = sopen(name, access, SH_DENYNO);
|
||||
descriptor = sopen(name, access, SH_DENYNO, pmode);
|
||||
if (descriptor != -1) {
|
||||
return fdopen(descriptor, mode);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user