WHB: Fix missing FSDelClient (#158)

This commit is contained in:
Maschell 2020-11-28 17:18:34 +01:00 committed by GitHub
parent 1282cbbda3
commit bc6ee14ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -17,6 +17,9 @@ typedef enum WHBFileError
WHB_FILE_FATAL_ERROR = -1,
} WHBFileError;
BOOL
WHBDeInitFileSystem();
int32_t
WHBOpenFile(const char *path,
const char *mode);

View File

@ -26,6 +26,20 @@ InitFileSystem()
return TRUE;
}
BOOL
WHBDeInitFileSystem()
{
if (sInitialised) {
if (FSDelClient(&sClient, -1) != FS_STATUS_OK) {
return FALSE;
}
sInitialised = FALSE;
}
return TRUE;
}
int32_t
WHBOpenFile(const char *path,
const char *mode)

View File

@ -75,6 +75,12 @@ WHBUnmountSdCard()
return FALSE;
}
result = FSDelClient(&sClient, -1);
if (result < 0) {
WHBLogPrintf("%s: FSDelClient error %d", __FUNCTION__, result);
return FALSE;
}
sMounted = FALSE;
return TRUE;
}