From a2a9c336a366f0f254b0aaca1d6bec740efaa430 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 26 Jun 2010 17:49:01 -0700 Subject: gptmbr: skip partitions with all-zero PartitionTypeGUID PartitionTypeGUID being zero means an empty slot, and so we should not count that partition type. Signed-off-by: H. Peter Anvin --- mbr/gptmbr.S | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mbr') diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S index d25d27c8..8ed4cf48 100644 --- a/mbr/gptmbr.S +++ b/mbr/gptmbr.S @@ -152,6 +152,12 @@ get_ptab: popw %ax /* SizeOfPartitionEntry */ find_part: + /* If the PartitionTypeGUID is all zero, it's an empty slot */ + movl (%di),%edx + orl 4(%di),%edx + orl 8(%di),%edx + orl 12(%di),%edx + jz not_this testb $0x04,48(%di) jz not_this andw %si,%si -- cgit v1.2.1