summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 21:51:01 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-16 21:51:01 +0000
commit841fe878f3e9eed6a3ada04a20daa45eec8cd935 (patch)
tree741db874f0a0f64b9df2567c466a8fbb38d020de /util/nvmutil
parentce139ab0aeea8cd8d2befe49db415ab156475238 (diff)
another comment
it's a pretty insane hack. i should probably just use normal fchmod Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 10b42598..66f18300 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -3204,6 +3204,12 @@ x_i_memcmp(const void *a, const void *b, unsigned long n)
return 0;
}
+/*
+ * emulate fchmod() using file descriptor
+ * paths, for old unix portability. should
+ * work on e.g. BSD/MacOS (/dev/fd/N),
+ * Linux (/proc/self/fd/N) and others
+ */
int
x_i_fchmod(int fd, mode_t mode)
{