From 2a46f2320be1fe3b536039ec591f06ffaa01986b Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Fri, 28 Nov 2014 20:19:34 +0000 Subject: [PATCH] fix floppy operations broken in r5089 git-svn-id: svn://kolibrios.org@5196 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/blkdev/disk_cache.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/blkdev/disk_cache.inc b/kernel/trunk/blkdev/disk_cache.inc index dcacf9de56..2e162c26de 100644 --- a/kernel/trunk/blkdev/disk_cache.inc +++ b/kernel/trunk/blkdev/disk_cache.inc @@ -623,10 +623,10 @@ end virtual ; Assume that devices < 3MB are floppies which are slow ; (ramdisk does not have a cache, so we don't even get here for ramdisk). ; This is a dirty hack, but the entire function is somewhat hacky. Use fs_read64*. - mov eax, [ebp+PARTITION.Disk] - cmp dword [eax+DISK.MediaInfo.Capacity+4], 0 + mov ecx, [ebp+PARTITION.Disk] + cmp dword [ecx+DISK.MediaInfo.Capacity+4], 0 jnz @f - cmp dword [eax+DISK.MediaInfo.Capacity], 3 shl (20-9) + cmp dword [ecx+DISK.MediaInfo.Capacity], 3 shl (20-9) jb .floppy @@: ; We want to prefetch CACHE_LEGACY_READ_SIZE sectors. @@ -755,6 +755,7 @@ end virtual ; and go to 4c. pop esi mov [esi+CACHE_ITEM.Status], CACHE_ITEM_COPY + mov ecx, [ebx+DISKCACHE.sector_size_log] jmp .found_in_cache ; On error at steps 13-14, release the lock