mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-25 02:09:36 +03:00
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:
parent
905b52e8ee
commit
bc2b9dffb5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user