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:
mkaply%us.ibm.com 2002-03-26 03:08:13 +00:00
parent 82539b938a
commit 77151f0c92

View File

@ -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);
}