From 3e7d2e526769f75bceda9e19295d0797cb6e707f Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Thu, 26 Jul 2007 15:57:15 +0000 Subject: [PATCH] load/eject CD tray functions check that input device is CD/DVD git-svn-id: svn://kolibrios.org@590 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index e1aaadf814..62368b254c 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -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