From fac0017532e2586192d38784f9626b6ac6420ad7 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 14 Mar 2026 18:02:11 +0000 Subject: util/nvmutil: fix file check Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/nvmutil') 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; -- cgit v1.2.1