diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:02:11 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:02:11 +0000 |
| commit | fac0017532e2586192d38784f9626b6ac6420ad7 (patch) | |
| tree | 770f18d41bf827cf324d0d994e5979ce1eba61eb /util/nvmutil | |
| parent | 573fdf0b22e1a04f35909186d62eebc5da53b74e (diff) | |
util/nvmutil: fix file check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -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; |
