Lucho
diff -ruN cvs/kernel/drivers/floppy.asm src/kernel/drivers/floppy.asm --- cvs/kernel/drivers/floppy.asm 2003-09-15 12:53:08.000000000 +0200 +++ src/kernel/drivers/floppy.asm 2004-03-17 10:06:42.000000000 +0200 @@ -73,10 +73,23 @@ push dx ; restore stack push ax ;
+ mov ax,15FFh ; get disk type
+ push cx
+ mov cx,-1
+ int 13h
+ pop cx
+ jc fl_dc_ret0
+ cmp ah,2 ; removable with change-line support?
+ stc
+ jne fl_dc_ret0 ; no, error
+
mov ah,16h ; read change status type
+ push si
+ xor si,si ; avoid crash on AT&T 6300
int 13h
+ pop si
- mov al,1 +fl_dc_ret0: mov al,1 jnc fl_dc_ret1 ; cy==1 is error or disk has changed
cmp ah,6 ; ah=6: disk has changed diff -ruN cvs/kernel/kernel/dsk.c src/kernel/kernel/dsk.c --- cvs/kernel/kernel/dsk.c 2004-02-07 20:16:26.000000000 +0200 +++ src/kernel/kernel/dsk.c 2004-03-17 10:17:04.000000000 +0200 @@ -237,11 +237,12 @@ { COUNT result;
- /* if it's a hard drive, media never changes */ if (hd(pddt->ddt_descflags)) - return M_NOT_CHANGED; - - if (play_dj(pddt) == M_CHANGED) + { + if (!(pddt->ddt_descflags & DF_CHANGELINE)) + return M_NOT_CHANGED; + } + else if (play_dj(pddt) == M_CHANGED) return M_CHANGED;
if (pddt->ddt_descflags & DF_CHANGELINE) /* if we can detect a change ... */
------------------------------------------------------- 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