summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-17 18:09:17 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-17 18:09:34 +0000
commitb00fb6127e505d2fde308615a1d0785a46553b2b (patch)
tree36e0b31283cf28907adf08711de765dd567b9127 /util/nvmutil/nvmutil.c
parent15b8cd7833d4a7dc0967433ff75f3900911a9a87 (diff)
util/nvmutil: remove stale comment
and add another Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index e536e273..5d59e4ca 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -531,6 +531,21 @@ lock_file(int fd)
return 0;
}
+/*
+ * TODO: make generic. S_ISREG: check every other
+ * type, erring only if it doesn't match what was
+ * passed as type requested.
+ * also:
+ * have variable need_seek, only err on seek if
+ * need_seek is set.
+ * also consider the stat check in this generic
+ * context
+ * make tthe return type an int, not a void.
+ * return -1 with errno set to indicate error,
+ * though the syscalls mostly handle that.
+ * save errno before lseek, resetting it after
+ * the check if return >-1
+ */
void
xopen(int *fd_ptr, const char *path, int flags, struct stat *st)
{
@@ -1442,7 +1457,6 @@ check_written_part(unsigned long p)
gbe_rw_size = cmd->rw_size;
- /* invert not needed for pwrite */
mem_offset = gbe_mem_offset(p, "pwrite");
file_offset = (off_t)gbe_file_offset(p, "pwrite");