fatfs: enable Long File Name

This commit is contained in:
King Kévin 2017-08-17 16:00:28 +02:00
parent 110a2e4665
commit 9d0c246422
2 changed files with 7 additions and 9 deletions

View File

@ -21,7 +21,9 @@
#include "ff.h" /* Declarations of FatFs API */
#include "diskio.h" /* Declarations of device I/O functions */
#if FF_USE_LFN
#include "ffunicode.c"
#endif
/*--------------------------------------------------------------------------
@ -2814,11 +2816,7 @@ FRESULT create_name ( /* FR_OK: successful, FR_INVALID_NAME: could not create */
while (p[si] == '/' || p[si] == '\\') si++; /* Skip duplicated separator if exist */
break;
}
if (c == '.' || i >= ni) { /* End of body or over size? */
if (ni == 11 || c != '.') return FR_INVALID_NAME; /* Over size or invalid dot */
i = 8; ni = 11; /* Goto extension */
continue;
}
if (c == '.' |
#if FF_CODE_PAGE == 0
if (ExCvt && c >= 0x80) { /* Is SBC extended character? */
c = ExCvt[c - 0x80]; /* To upper SBC extended character */

View File

@ -25,7 +25,7 @@
/ 3: f_lseek() function is removed in addition to 2. */
#define FF_USE_STRFUNC 1
#define FF_USE_STRFUNC 0
/* This option switches string functions, f_gets(), f_putc(), f_puts() and f_printf().
/
/ 0: Disable string functions.
@ -68,7 +68,7 @@
/ Locale and Namespace Configurations
/---------------------------------------------------------------------------*/
#define FF_CODE_PAGE 932
#define FF_CODE_PAGE 437
/* This option specifies the OEM code page to be used on the target system.
/ Incorrect code page setting can cause a file open failure.
/
@ -97,7 +97,7 @@
*/
#define FF_USE_LFN 0
#define FF_USE_LFN 1
#define FF_MAX_LFN 255
/* The FF_USE_LFN switches the support for LFN (long file name).
/