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

Function rdev_writeat

src/commonlib/region.c:95–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95ssize_t rdev_writeat(const struct region_device *rd, const void *b,
96 size_t offset, size_t size)
97{
98 const struct region_device *rdev;
99 struct region req = {
100 .offset = offset,
101 .size = size,
102 };
103
104 if (!normalize_and_ok(&rd->region, &req))
105 return -1;
106
107 rdev = rdev_root(rd);
108
109 if (rdev->ops->writeat == NULL)
110 return -1;
111
112 return rdev->ops->writeat(rdev, b, req.offset, req.size);
113}
114
115ssize_t rdev_eraseat(const struct region_device *rd, size_t offset,
116 size_t size)

Callers 15

save_vbnv_flashFunction · 0.85
update_spd_cacheFunction · 0.85
fmap_overwrite_areaFunction · 0.85
allocate_metadataFunction · 0.85
commit_data_allocationFunction · 0.85
commit_dataFunction · 0.85
flashconsole_tx_flushFunction · 0.85
elog_nv_writeFunction · 0.85
smmstore_append_dataFunction · 0.85
smmstore_rawwrite_regionFunction · 0.85

Calls 2

normalize_and_okFunction · 0.85
rdev_rootFunction · 0.85

Tested by 8

test_rdev_successFunction · 0.68
test_rdev_failureFunction · 0.68
test_rdev_wrapFunction · 0.68
test_rdev_chainFunction · 0.68
test_rdev_double_chainFunction · 0.68
test_mem_rdevFunction · 0.68