From bc2b9dffb54a3d52306198cdd46b4d54e8142d46 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Fri, 2 Oct 2009 16:43:58 +0000 Subject: [PATCH] fixed kernel crash at booting if invalid FAT partition is present git-svn-id: svn://kolibrios.org@1190 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/part_set.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/trunk/fs/part_set.inc b/kernel/trunk/fs/part_set.inc index 4f28f21946..458b7a40ec 100644 --- a/kernel/trunk/fs/part_set.inc +++ b/kernel/trunk/fs/part_set.inc @@ -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)