mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 05:36:23 +02:00
util/nvmutil: fix file check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -2052,10 +2052,10 @@ err_prw:
|
|||||||
static int
|
static int
|
||||||
check_file(int fd, struct stat *st)
|
check_file(int fd, struct stat *st)
|
||||||
{
|
{
|
||||||
if (fstat(fd, st) == -1)
|
if (fstat(fd, st) == -1)
|
||||||
goto err_is_file;
|
goto err_is_file;
|
||||||
|
|
||||||
if (S_ISREG(st->st_mode))
|
if (!S_ISREG(st->st_mode))
|
||||||
goto err_is_file;
|
goto err_is_file;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user