diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-10 06:51:47 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-10 06:51:47 +0000 |
| commit | e26511c8b8534abbbe68ddc7a3b0423d3305cc26 (patch) | |
| tree | caccdd356b64b056aedc77987bcaa82fc22faecf /util | |
| parent | 0a55f286c1cd495bc2b117461c6f8f3fad5f70a7 (diff) | |
util/nvmutil: err if unsupported rw_type on i/o
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 16e02c59..15ff3192 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -270,7 +270,7 @@ static const char *rname = NULL; * The code will handle this properly. */ static uint8_t buf[GBE_FILE_SIZE]; -static uint8_t pad[GBE_PART_SIZE]; +static uint8_t pad[GBE_PART_SIZE]; /* the file that wouldn't die */ static uint16_t mac_buf[3]; static off_t gbe_file_size; @@ -1366,6 +1366,9 @@ rw_file_exact(int fd, uint8_t *mem, size_t len, rval = pread(fd, mem + rc, len - rc, off + rc); else if (rw_type == LESEN) rval = read(fd, mem + rc, len - rc); + else + err(EIO, "%s: %s: Unsupported rw_type", + path, rw_type_str); if (rval > -1) { if (!rval) /* prevent infinite loop */ |
