From: John Hodge Date: Fri, 21 Jun 2013 10:31:12 +0000 (+0800) Subject: Modules/LVM - Detection for GPT in MBR code X-Git-Tag: rel0.15~424 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=266bb3d554fb2acb212dee9033f416a1a2a9d7f3;p=tpg%2Facess2.git Modules/LVM - Detection for GPT in MBR code - TODO: Move the GPT handling to its own handler and have some form of priority-based layout detection? --- diff --git a/KernelLand/Modules/Storage/LVM/mbr.c b/KernelLand/Modules/Storage/LVM/mbr.c index 67fdbce0..9de8fcd9 100644 --- a/KernelLand/Modules/Storage/LVM/mbr.c +++ b/KernelLand/Modules/Storage/LVM/mbr.c @@ -73,6 +73,14 @@ int LVM_MBR_CountSubvolumes(tLVM_Vol *Volume, void *FirstSector) numPartitions ++; } } + // Detect the GPT protector + if( extendedLBA == 0 && numPartitions == 1 && MBR->Parts[0].SystemID == 0xEE ) + { + // TODO: Hand off to GPT parsing code + Log_Warning("LBA MBR", "TODO: Hand off to GPT"); + } + + // Handle extended partions while(extendedLBA != 0) { extendedLBA = LVM_MBR_int_ReadExt(Volume, extendedLBA, &base, &len);