aboutsummaryrefslogtreecommitdiffstats
path: root/mbr/gptmbr.S
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-06-26 17:49:01 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-06-26 17:49:01 -0700
commita2a9c336a366f0f254b0aaca1d6bec740efaa430 (patch)
tree7ec05c36598c7b4b37c49772ec7e0c9f0c992c90 /mbr/gptmbr.S
parentf6f72bd64722876fa6684d293dc659cf5c141a39 (diff)
downloadsyslinux-a2a9c336a366f0f254b0aaca1d6bec740efaa430.tar.gz
syslinux-a2a9c336a366f0f254b0aaca1d6bec740efaa430.tar.xz
syslinux-a2a9c336a366f0f254b0aaca1d6bec740efaa430.zip
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 <hpa@zytor.com>
Diffstat (limited to 'mbr/gptmbr.S')
-rw-r--r--mbr/gptmbr.S6
1 files changed, 6 insertions, 0 deletions
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