From f1c34ec3ebf400a20bcf75c6cbab17a26e918927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 18 Sep 2008 09:20:34 +0000 Subject: [PATCH] Ah yes, here is the TODO I wrote with regards to the comment in my earlier commit. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27615 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/partitioning_systems/intel/PartitionMap.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp index 1576c6ddbb..7ea7cacffe 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp @@ -576,8 +576,16 @@ LogicalPartition::SetTo(const partition_descriptor *descriptor, { Unset(); if (descriptor && primary) { + // TODO: I am wondering if this is wrong, since it always uses the + // offset of the primary partition as base offset, even for + // logical partitions that come much later in the chain. For each, + // PTS in the chain of logical partitions, there should be one + // extended and one non-extended in the four possible table entries. + // So baseOffset would be wrong for all but the first three? The + // forth logical partition, assuming it's the extended one, would + // get a wrong baseOffset. off_t baseOffset = (descriptor->is_extended() ? primary->Offset() - : ptsOffset); + : ptsOffset); Partition::SetTo(descriptor, ptsOffset, baseOffset); fPrimary = primary; }