FATFS does not support f_stat call for drive root. When handling stat
for drive root, don't call f_stat and just return struct st with S_IFDIR
flag set.
Closes#984
Previously opendir("/data") would fail if filesystem with "data" prefix
was registered in VFS, while opendir("/data/") would succeed.
This change fixes handling for the former case and adds relevant tests.
- fix null pointer dereference in VFS when VFS implementations are added
and removed in different order
- vfs_fat_sdmmc, vfs_fat_spiflash: pass correct drive to mkfs
(previously it would always do mkfs in the first drive)
- add test case
This change moves actual test code into test_fatfs_common.c and
refactors setup/teardown code to be contained within separate functions.
For each SDMMC FATFS test, identical test is added which can run with
WL partition in flash.