`readdir()` should only output the name of the file, but littleFS
adds a leading `/`.
Neither FAT nor Linux will exhibit this behavior.
struct dirent *entry;
DIR *dir = opendir(".");
while ((entry = readdir(dir))) {
printf("%s\n", entry->d_name);
}
This results in surprising failures of code that expects filenames
to match that was tested on a different FS, when suddenly there is
a `/` in front of the filename.
The parameters of the MTD device (`sector_count`, `page_size`)
are only known after the device has been initialized.
Init the device before using it to avoid reading all 0 on e.g. SD cards.