From af61187587411dca38ff62e720451f08f19c1c82 Mon Sep 17 00:00:00 2001 From: chenjing Date: Mon, 26 Apr 2021 16:18:51 +0800 Subject: [PATCH] fix: fix the inappropriate errno in FatFs The errno of unrecognized fat filesystem changes from ENOENT to ENOTSUP. Close #I3O8IF --- fs/fat/os_adapt/fatfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/fat/os_adapt/fatfs.c b/fs/fat/os_adapt/fatfs.c index 46843f2f..ee39d653 100644 --- a/fs/fat/os_adapt/fatfs.c +++ b/fs/fat/os_adapt/fatfs.c @@ -93,10 +93,13 @@ int fatfs_2_vfs(int result) case FR_NO_FILE: case FR_NO_PATH: - case FR_NO_FILESYSTEM: status = ENOENT; break; + case FR_NO_FILESYSTEM: + status = ENOTSUP; + break; + case FR_INVALID_NAME: status = EINVAL; break;