Merged in paimonen/nuttx/pullreq_FAT_improvements (pull request #755)

Pullreq FAT improvements

* NuttX: Add CONFIG_FAT_LFN_ALIAS_HASH to speed up creating long filenames.

    Long filenames on FAT filesystems have associated 8.3 character alias
    short filenames. The traditional form of these is FILENA~1.EXT with
    a running count of the number of similar names. However creating this
    unique count can take several seconds if there are many similarly named
    files in the directory. Enabling FAT_LFN_ALIAS_HASH uses an alternative
    format of FI0123~1.TXT where the four digits are a hash of the original
    filename. This method is similar to what is used by Windows 2000 and
    later.

* NuttX: Add CONFIG_FAT_LFN_ALIAS_TRAILCHARS alternative format for 8.3 filenames.

    Traditional format for long filename 8.3 aliases takes first 6
    characters of long filename. If this option is set to N > 0,
    NuttX will instead take first 6-N and last N characters to form
    the short name. This is useful for filenames like "datafile12.txt"
    where the first characters would always remain the same.

* NuttX: FAT32: Fix file date corruption in fat_truncate().

* NuttX: if SD card wait seems to be a long one, give time for other threads to run.

Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
Petteri Aimonen
2018-11-09 13:46:16 +00:00
committed by GregoryN
parent 071d69e082
commit 96da659c0b
4 changed files with 72 additions and 2 deletions
+7
View File
@@ -50,6 +50,7 @@
#include <time.h>
#include <errno.h>
#include <debug.h>
#include <unistd.h>
#include <nuttx/arch.h>
#include <nuttx/clock.h>
@@ -441,6 +442,12 @@ static int mmcsd_waitready(FAR struct mmcsd_slot_s *slot)
}
elapsed = ELAPSED_TIME(start);
if (elapsed > MMCSD_DELAY_10MS)
{
// Give other threads time to run
usleep(10000);
}
}
while (elapsed < MMCSD_DELAY_500MS);