Lines Matching refs:record
54 static void file_record(struct ihex_binrec *record);
134 struct ihex_binrec *record; in process_ihex() local
162 record_size = ALIGN(sizeof(*record) + len, 4); in process_ihex()
163 record = malloc(record_size); in process_ihex()
164 if (!record) { in process_ihex()
168 memset(record, 0, record_size); in process_ihex()
169 record->len = len; in process_ihex()
172 if (i + 8 + (record->len * 2) > size) { in process_ihex()
178 record->addr = hex(data + i, &crc) << 8; i += 2; in process_ihex()
179 record->addr |= hex(data + i, &crc); i += 2; in process_ihex()
182 for (j = 0; j < record->len; j++, i += 2) in process_ihex()
183 record->data[j] = hex(data + i, &crc); in process_ihex()
197 if (!record->len) in process_ihex()
200 record->addr += offset; in process_ihex()
201 file_record(record); in process_ihex()
205 if (record->addr || record->len) { in process_ihex()
214 if (record->addr || record->len != 2) { in process_ihex()
222 offset = record->data[0] << 8 | record->data[1]; in process_ihex()
228 if (record->addr || record->len != 4) { in process_ihex()
234 memcpy(&data32, &record->data[0], sizeof(data32)); in process_ihex()
236 memcpy(&record->data[0], &data32, sizeof(data32)); in process_ihex()
241 file_record(record); in process_ihex()
254 static void file_record(struct ihex_binrec *record) in file_record() argument
258 while ((*p) && (!sort_records || (*p)->addr < record->addr)) in file_record()
261 record->next = *p; in file_record()
262 *p = record; in file_record()