Uint64 LVM_MBR_int_ReadExt(tLVM_Vol *Volume, Uint64 Addr, Uint64 *Base, Uint64 *Length);
// === GLOBALS ===
+tLVM_Format gLVM_MBRType = {
+ .Name = "MBR",
+ .CountSubvolumes = LVM_MBR_CountSubvolumes,
+ .PopulateSubvolumes = LVM_MBR_PopulateSubvolumes
+};
// === CODE ===
/**
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);
- if( extendedLBA == -1 ) break;
+ if( extendedLBA == (Uint64)-1 )
+ break;
numPartitions ++;
}
LOG("numPartitions = %i", numPartitions);
while(extendedLBA != 0)
{
extendedLBA = LVM_MBR_int_ReadExt(Volume, extendedLBA, &base, &len);
- if(extendedLBA == -1) break;
+ if(extendedLBA == (Uint64)-1)
+ break;
LVM_int_SetSubvolume_Anon( Volume, j, base, len );
j ++ ;
}