diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:02:11 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:41 +0000 |
| commit | 64389b696bc37d475ca50f38a5f23807af5ccc47 (patch) | |
| tree | 33b497cb097e1e1867a07787305ca78a5d200d06 | |
| parent | c5c629d7763e7fdbbe614c08dfbefae9acc65eda (diff) | |
util/nvmutil: fix file check
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
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; |
