Mail Archives: djgpp/1996/02/01/07:51:56
I may have found a bug in getmntent() (a v2 function which finds information
about a drive). It has a component function static int get_stacker_info(int
drive_num) to find if that drive is Stackered. It starts thus:-
static int get_stacker_info(int drive_num) {
__dpmi_regs r;
unsigned long stac_driver_ptr;
unsigned long tb = _go32_info_block.linear_address_of_transfer_buffer;
/* Put a known DWORD into the Transfer Buffer. If this drive
isn't compressed with Stacker, it will remain unchanged. */
_farpokel(dos_mem_base, tb, 0xbadabadaU);
r.x.ax = 0x4404; /* Stacker Get Driver Address function */
r.h.bl = drive_num;
r.x.cx = 4;
r.x.ds = tb >> 4;
r.x.dx = tb & 15;
__dpmi_int(0x21, &r);
if ((stac_driver_ptr = _farpeekl(dos_mem_base, tb)) == 0xbadabadaU) return 0;
/* This drive IS compressed with Stacker. Construct a linear address
of the far pointer into the Stacker device driver. */
stac_driver_ptr = ((stac_driver_ptr >> 12) & 0xffff0)
+ (stac_driver_ptr & 0xffff);
But on my PC, stac_driver_ptr here is neither the original 0xbadabada, nor any
pointer, but 0xffffffff:0xffffffff, thus causing an illegal address abort. My
copy of Ralf Brown's interrupt book says that DoubleSpace and DoubleDisk and
xDISK and COMBI-disk as well as Stacker all hook in version of AX=4404 int21.
I don't use any of these. My PC has the Doubledisk package on, but I don't
call it. I was running with Novell Netware active at the time.
- Raw text -