On Fri, 27 Feb 2004 19:23:56 -0800, Steve Gibson wrote:

I ran across a small FreeDOS kernel bug that I wanted to bring to your attention. Small though it is in the grand scheme of things, it is big enough to bring me back to building the kernel if you guys can come up with an interim source code patch to fix it.

The problem is that a device-driven fixed hard drive, created through, for example, a config.sys device driver, returns ZERO in AL, meaning that the device is removable, in response to the IOCTL (44h) subfunction 08h -- check if block device is removable.

An identical configuration of drivers and devices under MS-DOS returns the correct AL=1 for device-driven fixed drives.

Sorry for replying you so late, but I had concentrated on the EXIT crash bug before. The PC-DOS 7 Technical reference (http://www.redbooks.ibm.com/redbooks/pdfs/gg244459.pdf) says on page 103:


Removable Media Request
Command Code = 15 (0FH)

To use this call, set bit 11 of the attribute field to 1. Block devices can use this call only by way of a subfunction of the IOCtl function call (44H). This call is useful because it notifies a utility if it is dealing with a removable or nonremovable media drive. For example, the FORMAT utility needs to know whether a drive is removable or nonremovable because it displays
different versions of some prompts.

The information is returned in the busy bit of the status word. If the busy bit is 1, the media is nonremovable. If the busy bit is 0, the media is removable. No error bit checking is performed. It is assumed that this call always succeeds.

I think that our kernel does it right. After the driver processes the request, line 296 of ioctl.c just checks the busy bit (bit 9):


r-AX = (CharReqHdr.r_status & S_BUSY) ? 1 : 0;

Could you send me the driver to check its status or check it yourself? Otherwise I can't help more

Lucho


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to