Modules/LVM - Detection for GPT in MBR code
authorJohn Hodge <[email protected]>
Fri, 21 Jun 2013 10:31:12 +0000 (18:31 +0800)
committerJohn Hodge <[email protected]>
Fri, 21 Jun 2013 10:31:12 +0000 (18:31 +0800)
- TODO: Move the GPT handling to its own handler and have some form
  of priority-based layout detection?

KernelLand/Modules/Storage/LVM/mbr.c

index 67fdbce..9de8fcd 100644 (file)
@@ -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);

UCC git Repository :: git.ucc.asn.au