Add support for processing tape files and update context structures

This commit is contained in:
2025-10-07 11:30:11 +01:00
parent 01152f5c25
commit f62899ed06
5 changed files with 236 additions and 1 deletions

View File

@@ -123,6 +123,13 @@ typedef struct mediaTagEntry
UT_hash_handle hh; ///< uthash linkage.
} mediaTagEntry;
typedef struct TapeFileHashEntry
{
uint64_t key; ///< Composite key: partition << 32 | file
TapeFileEntry fileEntry; ///< The actual tape file data
UT_hash_handle hh; ///< UTHASH handle
} tapeFileHashEntry;
/** \struct aaruformatContext
* \brief Master context representing an open or increation Aaru image.
*
@@ -248,6 +255,8 @@ typedef struct aaruformatContext
bool compression_enabled; ///< True if block compression enabled (writing path).
uint32_t lzma_dict_size; ///< LZMA dictionary size (writing path).
tapeFileHashEntry *tapeFiles; ///< Hash table root for tape files
} aaruformatContext;
/** \struct DumpHardwareEntriesWithData

View File

@@ -37,6 +37,7 @@ void process_cicm_block(aaruformatContext *ctx, const IndexEntry *entry);
void process_aaru_metadata_json_block(aaruformatContext *ctx, const IndexEntry *entry);
void process_dumphw_block(aaruformatContext *ctx, const IndexEntry *entry);
void process_checksum_block(aaruformatContext *ctx, const IndexEntry *entry);
void process_tape_files_block(aaruformatContext *ctx, const IndexEntry *entry);
void add_subindex_entries(aaruformatContext *ctx, UT_array *index_entries, IndexEntry *subindex_entry);
int32_t decode_ddt_entry_v1(aaruformatContext *ctx, uint64_t sector_address, uint64_t *offset, uint64_t *block_offset,
uint8_t *sector_status);