summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 21:51:01 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit8911d2c1dda1df17d88f626c00eb9760de7b85de (patch)
tree24cd6fa8cf34ea0757096c77b5b528fa20c01a9d /util
parentc6ae1d5ea25ed266ee2bda924179ec715c99e762 (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')
-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)
{