From 841fe878f3e9eed6a3ada04a20daa45eec8cd935 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 16 Mar 2026 21:51:01 +0000 Subject: another comment it's a pretty insane hack. i should probably just use normal fchmod Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util') 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) { -- cgit v1.2.1