From 8f49b3612ac2793e48928917bc73b3a05663ecdb Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Fri, 13 Jul 2007 07:26:44 +0000 Subject: [PATCH] Check all 4 entry of MBR and EMBR git-svn-id: svn://kolibrios.org@578 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/fs/part_set.inc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/kernel/trunk/fs/part_set.inc b/kernel/trunk/fs/part_set.inc index 26c354b663..f23371c4da 100644 --- a/kernel/trunk/fs/part_set.inc +++ b/kernel/trunk/fs/part_set.inc @@ -7,10 +7,11 @@ $Revision$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;************************************************************* -;* 29.04.2006 Elimination of hangup after the * -;* expiration hd_wait_timeout - Mario79 * -;* 28.01.2006 find all Fat16/32 partition in all input point * -;* to MBR - Mario79 * +;* 12.07.2007 Check all 4 entry of MBR and EMBR +;* 29.04.2006 Elimination of hangup after the +;* expiration hd_wait_timeout - Mario79 +;* 28.01.2006 find all Fat16/32 partition in all input point +;* to MBR - Mario79 ;************************************************************* uglobal @@ -151,8 +152,17 @@ extended_already_set: cmp word [ebx+0x1fe],0xaa55 ; is it valid boot sector? jnz end_partition_chain cmp dword [ebx+0x1be+0xc],0 ; skip over empty partition - jz next_partition - +; jz next_partition + jnz .next_primary_partition + cmp dword [ebx+0x1be+0xc+16],0 + jnz next_primary_partition + cmp dword [ebx+0x1be+0xc+16+16],0 + jnz next_primary_partition_1 + cmp dword [ebx+0x1be+0xc+16+16+16],0 + jnz next_primary_partition_2 + jmp next_partition + +.next_primary_partition: push eax mov al,[ebx+0x1be+4] ; get primary partition type call scan_partition_types