[syslinux:master] diskstart: if no partition table, we need Hidden == 0

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Tue Jun 22 10:33:02 PDT 2010


Commit-ID:  e2a24eacc5d5ab9f994bcee17bf7d65e2178b6d1
Gitweb:     http://syslinux.zytor.com/commit/e2a24eacc5d5ab9f994bcee17bf7d65e2178b6d1
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 22 Jun 2010 10:30:28 -0700
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 22 Jun 2010 10:30:28 -0700

diskstart: if no partition table, we need Hidden == 0

If we don't have a partition table, we need to make sure Hidden gets
set to zero.

Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>


---
 core/diskstart.inc |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/core/diskstart.inc b/core/diskstart.inc
index 4f15ad2..7bb47dc 100644
--- a/core/diskstart.inc
+++ b/core/diskstart.inc
@@ -176,20 +176,26 @@ floppy:
 ;
 harddisk:
 		test byte [di-76],7Fh	; Sanity check: "active flag" should
-		jnz no_partition	; be 00 or 80
+		jnz .no_partition	; be 00 or 80
 		cmp eax,'!GPT'		; !GPT signature?
-		jne .not_gpt
+		jne .mbr
 		cmp byte [di-76+4],0EDh	; Synthetic GPT partition entry?
-		jne .not_gpt
+		jne .mbr
+.gpt:					; GPT-style partition info
 		push dword [di-76+20+36]
 		push dword [di-76+20+32]
 		jmp .gotoffs
-.not_gpt:
+.mbr:					; MBR-style partition info
 		push cx			; Upper half partition offset == 0
 		push cx
 		push dword [di-76+8]	; Partition offset (dword)
+		jmp .gotoffs
+.no_partition:
+		push cx
+		push cx
+		push cx
+		push cx
 .gotoffs:
-no_partition:
 ;
 ; Get disk drive parameters (don't trust the superblock.)  Don't do this for
 ; floppy drives -- INT 13:08 on floppy drives will (may?) return info about



More information about the Syslinux-commits mailing list