#include <exports.h>
#include <fat.h>
#include <fs.h>
+#include <log.h>
#include <asm/byteorder.h>
#include <part.h>
#include <malloc.h>
}
} else {
idx = size / mydata->sect_size;
- ret = disk_read(startsect, idx, buffer);
+ if (idx == 0)
+ ret = 0;
+ else
+ ret = disk_read(startsect, idx, buffer);
if (ret != idx) {
debug("Error reading data (got %d)\n", ret);
return -1;
if (!dent)
return 0;
- if (dent->name[0] == DELETED_FLAG ||
- dent->name[0] == aRING)
+ if (dent->name[0] == DELETED_FLAG)
continue;
if (dent->attr & ATTR_VOLUME) {
/* Volume label or VFAT entry, skip */
continue;
}
- } else if (!(dent->attr & ATTR_ARCH) &&
- !(dent->attr & ATTR_DIR))
- continue;
+ }
/* short file name */
break;