diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-06 17:47:49 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-06 17:47:49 +0000 |
| commit | 41f7f6352dcd5f6c26f3db4346e776f81a9a65a6 (patch) | |
| tree | c06e3625a3882677420dc07037dff99eb336be9a /util/nvmutil/nvmutil.c | |
| parent | b1abef8881dabc42faf9f35ec3c0b9527ac39816 (diff) | |
util/nvmutil: rename gbe_bound for clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 19846bf8..9d035e6e 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -46,7 +46,7 @@ static void set_word(size_t, int, uint16_t); static void check_bound(size_t, int); static void write_gbe(void); static void write_gbe_part(int); -static off_t gbe_bound(int, const char *); +static off_t gbe_file_offset(int, const char *); static void usage(void); static void err(int, const char *, ...); static const char *getnvmprogname(void); @@ -369,7 +369,7 @@ static void read_gbe_part(int p, int invert) { read_file_PERFECTLY_or_die(fd, buf + (GBE_PART_SIZE * (p ^ invert)), - GBE_PART_SIZE, gbe_bound(p, "pread"), fname, "pread"); + GBE_PART_SIZE, gbe_file_offset(p, "pread"), fname, "pread"); } static void @@ -772,7 +772,7 @@ static void write_gbe_part(int p) { if (pwrite(fd, buf + (GBE_PART_SIZE * p), - GBE_PART_SIZE, gbe_bound(p, "pwrite")) != GBE_PART_SIZE) { + GBE_PART_SIZE, gbe_file_offset(p, "pwrite")) != GBE_PART_SIZE) { err(ECANCELED, "Can't write %d b to '%s' p%d", GBE_PART_SIZE, fname, p); } @@ -787,7 +787,7 @@ write_gbe_part(int p) * This check is called, to ensure just that. */ static off_t -gbe_bound(int p, const char *f_op) +gbe_file_offset(int p, const char *f_op) { off_t off = (off_t)p * partsize; |
