82 TRACE(
"Entering process_index_v1(%p)", ctx);
84 UT_array *index_entries = NULL;
87 if(ctx == NULL || ctx->
imageStream == NULL)
return NULL;
90 const UT_icd index_entry_icd = {
sizeof(
IndexEntry), NULL, NULL, NULL};
92 utarray_new(index_entries, &index_entry_icd);
94 if(index_entries == NULL)
96 FATAL(
"Could not allocate memory for index entries array.");
97 TRACE(
"Exiting process_index_v1() = NULL");
106 utarray_free(index_entries);
108 TRACE(
"Exiting process_index_v1() = NULL");
116 utarray_free(index_entries);
118 TRACE(
"Exiting process_index_v1() = NULL");
125 FATAL(
"Incorrect index identifier.");
126 utarray_free(index_entries);
128 TRACE(
"Exiting process_index_v1() = NULL");
132 for(
int i = 0; i < idx_header.
entries; i++)
137 utarray_free(index_entries);
139 TRACE(
"Exiting process_index_v1() = NULL");
143 utarray_push_back(index_entries, &entry);
147 return index_entries;
Single index entry describing a block's type, (optional) data classification, and file offset.