diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-07 13:35:05 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-07 13:36:46 +0000 |
| commit | 3148d3179824b18597ccff739a0cacc86d55da1b (patch) | |
| tree | 8d8a0fc96ceb709ed872450fab35e21713c8178a | |
| parent | 96cb52f21a4bc0c7ee8552833ac129c4d8a0c54e (diff) | |
we need only declare it in the centralised gbe_file_offset
function, which determines whether a write to the gbe file
falls specifically within the 4KB range that is the gbe
part.
it is always half of the gbe file size, and then the first
4KB of each half stores the gbe part.
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3a374e6c..c9d9b4ca 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -875,8 +875,10 @@ write_gbe_file_part(size_t p) static off_t gbe_file_offset(size_t p, const char *f_op) { + off_t gbe_file_half_size = gbe_file_size >> 1; + return gbe_x_offset(p, f_op, "file", - gbe_file_size >> 1, gbe_file_size); + gbe_file_half_size, gbe_file_size); } /* |
