summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-10 16:25:43 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-10 16:25:43 +0000
commit454af1215308b1641fa408e325d87452e6e18495 (patch)
tree04b303327b82c1029bb2dc8ba1dc2f9ca1464abf /util
parent1403bdf1cc5e3265de78f0b79ae2e3d8c1c3931a (diff)
util/nvmutil: update some comments
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 419a51bb..9580b1fa 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -1344,8 +1344,7 @@ gbe_mem_offset(size_t p, const char *f_op)
}
/*
- * Reads to GbE from write_gbe_file_part and read_gbe_file_part
- * are filtered through here. These operations must
+ * I/O operations filtered here. These operations must
* only write from the 0th position or the half position
* within the GbE file, and write 4KB of data.
*
@@ -1579,6 +1578,15 @@ getnvmprogname(void)
return argv0;
}
+/*
+ * Set errno only if it hasn't already been set.
+ * This prevents overriding real libc errors.
+ *
+ * We use errno for regular program state, while
+ * being careful not to clobber what was set by
+ * real libc function, or a minority of our stub
+ * functions such as prw()
+ */
static void
set_err_if_unset(int x)
{