Mail Archives: djgpp/1994/10/23/15:25:03
access() will fail sometimes.
As a previous discussion showed, the flags in the register structure
must be set, before calling go32_dpmi_simulate_int.
The trivial patch does this. Of course it might be even better to use memset
to clear the whole register structure, but, after only clearing the flags,
the bug never showed again.
Dieter
*** access.oc2 Mon Sep 12 00:26:16 1994
--- access.c Sun Oct 16 05:07:32 1994
***************
*** 21,27 ****
int access(const char *fn, int flags)
{
_go32_dpmi_registers r;
! r.x.ss = r.x.sp = 0;
r.h.ah = 0x43;
r.h.al = 0;
r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;
--- 21,27 ----
int access(const char *fn, int flags)
{
_go32_dpmi_registers r;
! r.x.flags = r.x.ss = r.x.sp = 0;
r.h.ah = 0x43;
r.h.al = 0;
r.x.dx = _go32_info_block.linear_address_of_transfer_buffer & 0xf;
- Raw text -