util/nvmutil: fix file check

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-14 18:02:11 +00:00
parent 573fdf0b22
commit fac0017532

View File

@@ -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;