Skip to content

Commit 53f2b1a

Browse files
martin-gpyigaw
authored andcommitted
fabrics: fix incorrect access filename check
Config JSON file handling is currently broken due to an incorrect access filename check. Fix it. Signed-off-by: Martin George <marting@netapp.com>
1 parent f7c7953 commit 53f2b1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fabrics.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ static int nvme_read_volatile_config(nvme_root_t r)
669669

670670
static int nvme_read_config_checked(nvme_root_t r, const char *filename)
671671
{
672-
if (!access(filename, F_OK))
673-
return -ENOENT;
672+
if (access(filename, F_OK))
673+
return -errno;
674674
if (nvme_read_config(r, filename))
675675
return -errno;
676676
return 0;

0 commit comments

Comments
 (0)