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 *sectorSuffixDdtMini;
|
||||
uint64_t cachedDdtOffset;
|
||||
uint64_t cachedDdtPosition;
|
||||
uint64_t primaryDdtOffset;
|
||||
uint16_t *cachedSecondaryDdtSmall;
|
||||
uint32_t *cachedSecondaryDdtBig;
|
||||
|
||||
@@ -1138,7 +1138,9 @@ void set_ddt_multi_level_v2(aaruformatContext *ctx, uint64_t sectorAddress, bool
|
||||
else
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user