Hi Mike, here is the code of int 21 function 32 of FreeDOS: > /* Get DPB */ > case 0x32: > /* r->DL is NOT changed by MS 6.22 */ > /* INT21/32 is documented to reread the DPB */ > { > int drv = (lr.DL == 0 || lr.AH == 0x1f) ? default_drive : lr.DL - 1; > struct dpb FAR *dpb = get_dpb(drv); > > if (dpb == NULL) > { > CritErrCode = -DE_INVLDDRV; > lr.AL = 0xFF; > break; > } > /* hazard: no error checking! */ > flush_buffers(dpb->dpb_unit); > dpb->dpb_flags = M_CHANGED; /* force flush and reread of drive > BPB/DPB */ > > #ifdef WITHFAT32 > if (media_check(dpb) < 0 || ISFAT32(dpb)) > #else > if (media_check(dpb) < 0) > #endif > { > lr.AL = 0xff; > CritErrCode = -DE_INVLDDRV; > break; > } > lr.DS = FP_SEG(dpb); > lr.BX = FP_OFF(dpb); > lr.AL = 0; > } > > break;
Not sure if that changed recently but the main action is the get_dpb() and as said, only FAT drives have a DPB :-) The second relevant step is the media_check() call after flushing buffers to enforce the use of fresh information. > I missed the network drive part, which makes the code is incorrect. You mean it makes you realize that your code does something else than you originally intended? > However, I tested FreeDOS in a virtual machine to confirm the bug, and > no drives are showing up there. That seems to be an error - there is at > least the virtual hard drive (C:) which is a FAT device that should have > shown up. What sorts of drives does DOS have in your virtual machine and what kind of virtual machine do you use? Which version of the FreeDOS kernel? Note that you pass the drive number in DL one-based, because 0 means current drive. So C is 3. > missing all drives under FreeDOS if I use INT 21,32h. > What am I missing? Your virtual drives might in fact be all non-FAT, why not? Eric ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel