changes from Japheth (HXDOS)

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1170 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Kenneth J Davis 2005-12-16 09:44:36 +00:00
parent 92bb87ffaf
commit d442e92e65

View File

@ -256,10 +256,15 @@ static void interrupt far handler2f(intregs_t iregs) {
iregs.ax = access_check
(iregs.bx,
iregs.cx,
#if 0
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
(((unsigned long)iregs.di) & 0xffffL) ),
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
(((unsigned long)iregs.dx) & 0xffffL) ),
#else
( (((unsigned long)iregs.si)<<16) + iregs.di ),
( (((unsigned long)iregs.es)<<16) + iregs.dx ),
#endif
(iregs.ax & 0x01));
return;
}
@ -269,10 +274,15 @@ static void interrupt far handler2f(intregs_t iregs) {
iregs.ax = lock_unlock
(iregs.bx,
iregs.cx,
#if 0
( ((((unsigned long)iregs.si)<<16) & 0xffff0000L) |
(((unsigned long)iregs.di) & 0xffffL) ),
( ((((unsigned long)iregs.es)<<16) & 0xffff0000L) |
(((unsigned long)iregs.dx) & 0xffffL) ),
#else
( (((unsigned long)iregs.si)<<16) | ((unsigned long)iregs.di) ),
( (((unsigned long)iregs.es)<<16) | ((unsigned long)iregs.dx) ),
#endif
(iregs.ax & 0x01));
return;
}
@ -529,6 +539,9 @@ static int lock_unlock
if (len < 1L) return 0;
/* there was a error in the code below preventing any other
than the first locked region to be unlocked (japheth, 09/2005) */
if (unlock) {
for (i = 0; i < lock_table_size; i++) {
lptr = &lock_table[i];
@ -540,10 +553,9 @@ static int lock_unlock
lptr->used = 0;
return 0;
}
}
/* Not already locked by us; can't unlock. */
return -(0x21); /* lock violation */
}
return -(0x24); /* sharing buffer overflow */
} else {
if (access_check(0, fileno, ofs, len, 0)) {
/* Already locked; can't lock. */