Fix getdirentries in libc_ffat

This commit is contained in:
Norman Feske 2012-05-29 10:40:26 +02:00 committed by Christian Helmuth
parent bf91ea8926
commit b86f0c8b32

View File

@ -322,9 +322,6 @@ class Plugin : public Libc::Plugin
FILINFO ffat_file_info;
FRESULT res;
const unsigned int index = *basep / sizeof(struct dirent);
f_readdir(_get_ffat_dir(fd), 0);
for (unsigned int i = 0; i <= index; i++) {
res = f_readdir(_get_ffat_dir(fd), &ffat_file_info);
switch(res) {
case FR_OK:
@ -340,7 +337,6 @@ class Plugin : public Libc::Plugin
PERR("f_readdir() returned an unexpected error code");
return -1;
}
}
if (ffat_file_info.fname[0] == 0) { /* no (more) entries */
if (verbose)