load/eject CD tray functions check that input device is CD/DVD

git-svn-id: svn://kolibrios.org@590 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2007-07-26 15:57:15 +00:00
parent 1d9fff9e92
commit 3e7d2e5267

View File

@ -4991,13 +4991,25 @@ syscall_cdaudio: ; CD
and eax, 1
mov [DiskNumber], eax
call reserve_cd_channel
and ebx, 3
inc ebx
mov [cdpos], ebx
add ebx, ebx
mov cl, 8
sub cl, bl
mov al, [DRIVE_DATA+1]
shr al, cl
test al, 2
jz .err
ret
.free:
call free_cd_channel
and [cd_status], 0
ret
.err:
call .free
pop eax
ret
align 4