Add first batch of tests

and fix some issues.
This commit is contained in:
Godzil
2022-05-27 10:38:13 +01:00
committed by Manoel Trapier
parent 07edd92023
commit 57f8283df7
12 changed files with 132 additions and 11 deletions

View File

@@ -14,7 +14,15 @@
/* Public API */
miniffs_t *miniffs_openfs(uintptr_t address)
{
miniffs_t *fs = (miniffs_t *)calloc(1, sizeof(miniffs_t));
miniffs_t *fs = NULL;
if (address == 0)
{
miniffs_seterror(MINIFFS_INVALID_FS);
goto exit;
}
fs = (miniffs_t *)calloc(1, sizeof(miniffs_t));
if (fs == NULL)
{
miniffs_seterror(MINIFFS_ALLOCATION_ERROR);