mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Add cachedDdtPosition to track primary DDT position for new tables
This commit is contained in:
@@ -115,6 +115,7 @@ typedef struct aaruformatContext
|
|||||||
uint16_t *sectorPrefixDdtMini;
|
uint16_t *sectorPrefixDdtMini;
|
||||||
uint16_t *sectorSuffixDdtMini;
|
uint16_t *sectorSuffixDdtMini;
|
||||||
uint64_t cachedDdtOffset;
|
uint64_t cachedDdtOffset;
|
||||||
|
uint64_t cachedDdtPosition;
|
||||||
uint64_t primaryDdtOffset;
|
uint64_t primaryDdtOffset;
|
||||||
uint16_t *cachedSecondaryDdtSmall;
|
uint16_t *cachedSecondaryDdtSmall;
|
||||||
uint32_t *cachedSecondaryDdtBig;
|
uint32_t *cachedSecondaryDdtBig;
|
||||||
|
|||||||
@@ -1139,6 +1139,8 @@ void set_ddt_multi_level_v2(aaruformatContext *ctx, uint64_t sectorAddress, bool
|
|||||||
ctx->cachedSecondaryDdtBig = (uint32_t *)buffer;
|
ctx->cachedSecondaryDdtBig = (uint32_t *)buffer;
|
||||||
|
|
||||||
ctx->cachedDdtOffset = 0; // Will be set when written to file
|
ctx->cachedDdtOffset = 0; // Will be set when written to file
|
||||||
|
ctx->cachedDdtPosition = ddtPosition; // Track which primary DDT position this new table belongs to
|
||||||
|
TRACE("Created new secondary DDT for position %" PRIu64, ddtPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 6: Update the corresponding DDT entry
|
// Step 6: Update the corresponding DDT entry
|
||||||
|
|||||||
Reference in New Issue
Block a user