MCPcopy Create free account
hub / github.com/coreboot/coreboot / commit_data_allocation

Function commit_data_allocation

src/lib/region_file.c:350–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350static int commit_data_allocation(struct region_file *f, size_t data_blks)
351{
352 size_t offset;
353
354 f->slot++;
355
356 offset = f->slot * sizeof(uint16_t);
357 f->data_blocks[0] = region_file_data_end(f);
358 f->data_blocks[1] = region_file_data_begin(f) + data_blks;
359
360 if (rdev_writeat(&f->metadata, &f->data_blocks[1], offset,
361 sizeof(f->data_blocks[1])) < 0)
362 return -1;
363
364 return 0;
365}
366
367static int commit_data(const struct region_file *f,
368 const struct update_region_file_entry *entries,

Callers 1

handle_updateFunction · 0.85

Calls 3

region_file_data_endFunction · 0.85
region_file_data_beginFunction · 0.85
rdev_writeatFunction · 0.85

Tested by

no test coverage detected