diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-03 00:40:07 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-03 00:40:07 +0000 |
| commit | 2b01e023abff6a75b5033978200ce156ac9c643a (patch) | |
| tree | 426d8466b4573b7267d51c3c6f91fbe43deead5f /util | |
| parent | 1bfc89e3ad021231d3d8e57d23a080d51d95622a (diff) | |
util/nvmutil: remove do_read
pointless code complication, that doesn't yield a noticeable
performance increase.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 1f592af0..c9b29051 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -42,7 +42,7 @@ uint8_t buf[SIZE_8KB]; uint16_t mac[3] = {0, 0, 0}; size_t partsize; uint8_t *gbe[2]; -uint8_t nvmPartChanged[2] = {0, 0}, do_read[2] = {1, 1}; +uint8_t nvmPartChanged[2] = {0, 0}; int flags, rfd, fd, part, e = 1; const char *strMac = NULL, *strRMac = "xx:xx:xx:xx:xx:xx", *fname = NULL; @@ -188,10 +188,6 @@ xopen(int *f, const char *l, int p, struct stat *st) void nvmalloc(void) { - /* only read the part specified, for copy/setchecksum/brick */ - if ((cmd == cmd_copy) || (cmd == cmd_setchecksum) || (cmd == cmd_brick)) - do_read[part ^ 1] = 0; - gbe[0] = buf; gbe[1] = buf + SIZE_4KB; } @@ -200,8 +196,7 @@ void readGbe(void) { for (int p = 0; p < 2; p++) - if (do_read[p]) - readGbe_part(p); + readGbe_part(p); } void |
