summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-14 18:02:11 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:41 +0000
commit64389b696bc37d475ca50f38a5f23807af5ccc47 (patch)
tree33b497cb097e1e1867a07787305ca78a5d200d06
parentc5c629d7763e7fdbbe614c08dfbefae9acc65eda (diff)
util/nvmutil: fix file check
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c09ecd85..18edf40c 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -2052,10 +2052,10 @@ err_prw:
static int
check_file(int fd, struct stat *st)
{
- if (fstat(fd, st) == -1)
+ if (fstat(fd, st) == -1)
goto err_is_file;
- if (S_ISREG(st->st_mode))
+ if (!S_ISREG(st->st_mode))
goto err_is_file;
return 0;