[syslinux:master] gptmbr: skip partitions with all-zero PartitionTypeGUID
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sat Jun 26 17:51:16 PDT 2010
Commit-ID: a2a9c336a366f0f254b0aaca1d6bec740efaa430
Gitweb: http://syslinux.zytor.com/commit/a2a9c336a366f0f254b0aaca1d6bec740efaa430
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sat, 26 Jun 2010 17:49:01 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sat, 26 Jun 2010 17:49:01 -0700
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 at zytor.com>
---
mbr/gptmbr.S | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/mbr/gptmbr.S b/mbr/gptmbr.S
index d25d27c..8ed4cf4 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
More information about the Syslinux-commits
mailing list