fixed kernel crash at booting if invalid FAT partition is present

git-svn-id: svn://kolibrios.org@1190 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2009-10-02 16:43:58 +00:00
parent 905b52e8ee
commit bc2b9dffb5

View File

@ -383,9 +383,13 @@ boot_read_ok:
mov [FAT_START],eax ; fat_start = partition_start + reserved
movzx eax,byte [ebx+0xd] ; sectors per cluster
test eax,eax
jz problem_fat_dec_count
mov [SECTORS_PER_CLUSTER],eax
movzx ecx,word [ebx+0xb] ; bytes per sector
cmp eax,0x200
jnz problem_fat_dec_count
mov [BYTES_PER_SECTOR],ecx
movzx eax,word [ebx+0x11] ; count of rootdir entries (=0 fat32)