## Updates and Migration Notes

Revision | Updates | Migration Notes
--- | --- | ---

R0.15
Nov 6, 2022

Changed user provided synchronization functions in order to completely eliminate the platform dependency from FatFs code.
Fixed a potential error in `f_mount` when `FF_FS_REENTRANT`.
Fixed file lock control `FF_FS_LOCK` is not mutal excluded when `FF_FS_REENTRANT && FF_VOLUMES > 1` is true.
Fixed `f_mkfs` creates broken exFAT volume when the size of volume is `>= 2^32` sectors.
Fixed string functions cannot write the unicode characters not in BMP when `FF_LFN_UNICODE == 2` (UTF-8).
Fixed a compatibility issue in identification of GPT header.

User provided synchronization functions, `ff_cre_syncobj`, `ff_del_syncobj`, `ff_req_grant` and `ff_rel_grant`, needed when `FF_FS_REENTRANT` are replaced by `ff_mutex_create`, `ff_mutex_delete`, `ff_mutex_take` and `ff_mutex_give` respectively. For examples, see `ffsystem.c`.
`FF_SYNC_t` is removed from the configuration options.

R0.14b
Apr 17, 2021

Made FatFs uses standard library `string.h` for copy, compare and search instead of built-in string functions.
Added support for long long integer and floating point to `f_printf`. (`FF_STRF_LLI` and `FF_STRF_FP`)
Made path name parser ignores the terminating separator to allow `"dir/"`.
Improved the compatibility in Unix style path name feature.
Fixed the file gets dead-locked when `f_open` failed with certain conditions. (appeared at R0.12a)
Fixed `f_mkfs` can create wrong exFAT volume due to a timing dependent error. (appeared at R0.12)
Fixed code page 855 cannot be set by `f_setcp`. (appeared at R0.13)
Fixed some compiler warnings.

From this revision, FatFs depends on `string.h`.

R0.14a Dec 05, 2020 | Limited number of recursive calls in `f_findnext` to prevent stack overflow. Fixed old floppy disks formatted with MS-DOS 2.x and 3.x cannot be mounted. Fixed some compiler warnings. | Number of wildcards in the matching pattern in `f_findfirst` is limited to 4.

R0.14
Oct 14, 2019

Added support for 64-bit LBA and GUID partition table (`FF_LBA64`)
Changed some API functions, `f_mkfs` and `f_fdisk`.
Fixed `f_open` cannot find the file with file name in length of `FF_MAX_LFN` characters.
Fixed `f_readdir` cannot retrieve long file names in length of `FF_MAX_LFN - 1` characters.
Fixed `f_readdir` returns file names with wrong case conversion. (appeared at R0.12)
Fixed `f_mkfs` can fail to create exFAT volume in the second partition. (appeared at R0.12)

Usage of `f_mkfs` and `f_fdisk` is changed and some features are added to these functions.

R0.13c
Oct 14, 2018

Supported `stdint.h` for C99 and later. (`integer.h` was included in `ff.h`)
Fixed reading a directory gets infinite loop when the last directory entry is not empty. (appeared at R0.12)
Fixed creating a sub-directory in the fragmented sub-directory on the exFAT volume collapses FAT chain of the parent directory. (appeared at R0.12)
Fixed `f_getcwd` cause output buffer overrun when the buffer has a valid drive number. (appeared at R0.13b)

From this revision, FatFs depends on `stdint.h` in C99 or later.
`integer.h` is removed.

R0.13b Apr 07, 2018 | Added support for UTF-32 encoding on the API. (`FF_LFN_UNICODE = 3`) Added support for Unix style volume prefix. (`FF_STR_VOLUME_ID = 2`) Fixed accesing objects in the exFAT root directory beyond the cluster boundary can fail. (appeared at R0.12c) Fixed `f_setlabel` does not reject some invalid characters. (appeared at R0.09b) |

R0.13a
Oct 14, 2017

Added support for UTF-8 encoding on the API. (`FF_LFN_UNICODE = 2`)
Added options for file name output buffer. (`FF_LFN_BUF, FF_SFN_BUF`)
Added dynamic memory allocation option for working buffer of `f_mkfs` and `f_fdisk`.
Fixed `f_fdisk` and `f_mkfs` create the partition table with wrong CHS parameters. (appeared at R0.09)
Fixed `f_unlink` can cause lost clusters at fragmented file on the exFAT volume. (appeared at R0.12c)
Fixed `f_setlabel` rejects some valid characters for exFAT volume. (appeared at R0.12)

R0.13
May 21, 2017

Prefix of configuration item names are changed from `"_"` to `"FF_"`.
Added `f_setcp`, run-time code page configuration. (`FF_CODE_PAGE = 0`)
Improved cluster allocation time on stretch a deep buried cluster chain.
Improved processing time of `f_mkdir` with large cluster size by using `FF_USE_LFN = 3`.
Improved exFAT `NoFatChain` flag of the fragmented file to be set after it is truncated and got contiguous.
Fixed archive attribute is left not set when a file on the exFAT volume is renamed. (appeared at R0.12)
Fixed exFAT FAT entry can be collapsed when write or lseek operation to the existing file is done. (appeared at R0.12c)
Fixed creating a file can fail when a new cluster allocation to the exFAT directory occures. (appeared at R0.12c)

ASCII only configuration, `FF_CODE_PAGE = 1`, is removed. Use `FF_CODE_PAGE = 437` instead.

R0.12c Mar 04, 2017 | Improved write throughput at the fragmented file on the exFAT volume. Made memory usage for exFAT be able to be reduced as decreasing `_MAX_LFN`. Fixed successive `f_getfree` can return wrong count on the FAT12/16 volume. (appeared at R0.12) Fixed configuration option `_VOLUMES` cannot be set 10. (appeared at R0.10c) |

R0.12b
Sep 4, 2016

Made `f_rename` be able to rename objects with the same name but case.
Fixed an error in the case conversion teble of code page 866. (`ff.c`)
Fixed writing data is truncated at the file offset 4GiB on the exFAT volume. (appeared at R0.12)
Fixed creating a file in the root directory of exFAT volume can fail. (appeared at R0.12)
Fixed `f_mkfs` creating exFAT volume with too small cluster size can collapse unallocated memory. (appeared at R0.12a)
Fixed wrong object name can be returned when read directory at Unicode cfg. (appeared at R0.12)
Fixed large file allocation/removing on the exFAT volume collapses allocation bitmap. (appeared at R0.12)
Fixed some internal errors in `f_expand` and `f_lseek.` (appeared at R0.12)

R0.12a
Jul 10, 2016

Added support for creating exFAT volume with some changes of `f_mkfs`.
Added a file open method `FA_OPEN_APPEND`.
`f_forward` is available regardless of `_FS_TINY`.
Fixed `f_mkfs` creates broken volume. (appeared at R0.12)
Fixed wrong memory read in `create_name`. (appeared at R0.12)
Fixed compilation fails at some configurations, `_USE_FASTSEEK` and `_USE_FORWARD`.

Usage of `f_mkfs` is changed.

R0.12
Apr 12, 2016

Added support for exFAT file system. (`_FS_EXFAT`)
Added `f_expand`. (`_USE_EXPAND`)
Changed some members in `FINFO` and behavior of `f_readdir`.
Added a configuration option `_USE_CHMOD`.
Fixed errors in the case conversion teble of Unicode (`cc*.c`).

Usage and members of `FINFO` sructure used in `f_readdir` is changed.
Many members in `FIL` and `DIR` structure are changed.
To use `f_chmod`, `_USE_CHMOD` needs to be set.
`_WORD_ACCESS` is removed from the configuration options.
Dot entries are never appear in `f_reeddir`.

R0.11a Sep 5, 2015 | Fixed wrong media change can lead a deadlock at thread-safe configuration. Added code page 771, 860, 861, 863, 864, 865 and 869. (`_CODE_PAGE`) Fixed errors in the case conversion teble of code page 437 and 850 (`ff.c`). Fixed errors in the case conversion teble of Unicode (`cc*.c`). | Removed some code pages actually not exist on the standard systems. (`_CODE_PAGE`)
R0.11 Feb 9, 2015 | Added `f_findfirst` and `f_findnext.` (`_USE_FIND`) Fixed `f_unlink` does not remove cluster chain of the file. (appeared at R0.10c) Fixed `_FS_NORTC` option does not work properly. (appeared at R0.10c) |
R0.10c Nov 9, 2014 | Added a configuration option for the platforms without RTC. (`_FS_NORTC`) Fixed volume label created by Mac OS X cannot be retrieved with `f_getlabel`. (appeared at R0.09b) Fixed a potential problem of FAT access that can appear on disk error. Fixed null pointer dereference on attempting to delete the root direcotry. (appeared at R0.08) |
R0.10b May 19, 2014 | Fixed a hard error in the disk I/O layer can collapse the directory entry. Fixed LFN entry is not deleted on delete/rename an object with its lossy converted SFN. (appeared at R0.07) |

R0.10a
Jan 15, 2014

Added arbitrary strings as drive number in the path name. (`_STR_VOLUME_ID`)
Added an option for minimum sector size. (`_MIN_SS`)
2nd argument of `f_rename` can have a drive number and it will be ignored.
Fixed `f_mount` with forced mount fails when drive number is larger than 0. (appeared at R0.10)
Fixed `f_close` invalidates the file object without volume lock.
Fixed volume lock is left acquired after return from `f_closedir`. (appeared at R0.10)
Fixed creation of a directory entry with LFN fails on too many SFN collisions. (appeared at R0.07)

R0.10
Oct 2, 2013

Added an option for character encoding on the file. (`_STRF_ENCODE`)
Added f_closedir.
Added forced full FAT scan option for `f_getfree`. (`_FS_NOFSINFO`)
Added forced mount option with changes of `f_mount`.
Improved behavior of volume auto detection.
Improved write throughput of `f_puts` and `f_printf`.
Changed argument of `f_chdrive,` `f_mkfs`, `disk_read` and `disk_write`.
Fixed `f_write` can be truncated when the file size is close to 4 GB.
Fixed `f_open`, `f_mkdir` and `f_setlabel` can return incorrect result code on error.

R0.09b Jan 24, 2013 | Added `f_getlabel` and `f_setlabel`. (`_USE_LABEL`) |
R0.09a Aug 27, 2012 | Fixed assertion failure due to OS/2 EA on FAT12/16 volume. Changed file functions reject null object pointer to avoid crash. Changed option name `_FS_SHARE` to `_FS_LOCK`. |
R0.09 Sep 6, 2011 | `f_mkfs` supports multiple partition on a physical drive. Added `f_fdisk`. (`_MULTI_PARTITION = 2`) |
R0.08b Jan 15, 2011 | Fast seek function is also applied to `f_read` and `f_write`. `f_lseek` reports required table size on creating CLMP. Extended format syntax of `f_printf`. Ignores duplicated directory separators in given path names. |
R0.08a Aug 16, 2010 | Added `f_getcwd`. (`_FS_RPATH = 2`) Added sector erase function. (`_USE_ERASE`) Moved file lock semaphore table from fs object to the bss. Fixed `f_mkdir` creates wrong directory on non-LFN cfg when the given name contains `';'`. Fixed `f_mkfs` creates wrong FAT32 volume. |
R0.08 May 15, 2010 | Added an option to `_USE_LFN` Added support of file lock. (`_FS_SHARE`) Added fast seek function. (`_USE_FASTSEEK`) Changed a type name on the API, `XCHAR` to `TCHAR`. Changed member, `fname`, in the `FILINFO` on Unicode cfg. String functions support UTF-8 encoding files on Unicode cfg. |
R0.07e Nov 3, 2009 | Separated out configuration options from `ff.h` to `ffconf.h`. Added a configuration option, `_LFN_UNICODE`. Fixed `f_unlink` fails to remove a sub-dir on `_FS_RPATH`. Fixed name matching error on the 13 char boundary. Changed `f_readdir` to return the SFN with always upper case on non-LFN cfg. |
R0.07c Jan 21, 2009 | Fixed `f_unlink` may return FR_OK on error. Fixed wrong cache control in `f_lseek`. Added support of relative path. Added `f_chdir`. Added `f_chdrive`. Added proper case conversion to extended characters. |
R0.07a Apr 14, 2009 | Separated out OS dependent code on re-entrant configuration. Added multiple sector size support. |
R0.07 Apr 1, 2009 | Merged Tiny-FatFs into FatFs as a buffer configuration option. Added support for long file extension. Added multiple code page support. Added re-entrancy for multitask operation. Added auto cluster size selection to `f_mkfs`. Added rewind option to `f_readdir`. Changed result code of critical errors. Renamed string functions to avoid name collision. |
R0.06 Apr 1, 2008 | Added `f_forward`. (Tiny-FatFs) Added string functions: `f_gets`, `f_putc`, `f_puts` and `f_printf`. Improved performance of `f_lseek` on moving to the same or following cluster. |
R0.05a Feb 3, 2008 | Added `f_truncate`. Added `f_utime`. Fixed off by one error at FAT sub-type determination. Fixed btr in `f_read` can be mistruncated. Fixed cached sector is left not flushed when create and close without write. |
R0.05 Aug 26, 2007 | Changed arguments of `f_read`, `f_write`. Changed arguments of `f_mkfs`. (FatFs) Fixed `f_mkfs` on FAT32 creates incorrect FSInfo. (FatFs) Fixed `f_mkdir` on FAT32 creates broken directory. (FatFs) |
R0.04b May 5, 2007 | Added `_USE_NTFLAG` option. Added support for FSInfo in FAT32 volume. Fixed some problems corresponds to FAT32. (Tiny-FatFs) Fixed DBCS name can result `FR_INVALID_NAME`. Fixed short seek (`<= csize`) collapses the file object. |
R0.04a Apr 1, 2007 | Supported multiple partitions on a plysical drive. (FatFs) Added minimization level 3. Added a capability of extending file size to `f_lseek`. Fixed an endian sensitive code in `f_mkfs`. (FatFs) Fixed a problem corresponds to FAT32 support. (Tiny-FatFs) |
R0.04 Feb 4, 2007 | Supported multiple drive system. (FatFs) Changed some APIs for multiple drive system. Added `f_mkfs`. (FatFs) Added `_USE_FAT32` option. (Tiny-FatFs) |
R0.03a Dec 11, 2006 | Improved cluster scan algolithm to write files fast. Fixed `f_mkdir` creates broken directory on FAT32. |
R0.03 Sep 22, 2006 | Added `f_rename`. Changed option `_FS_MINIMUM` to `_FS_MINIMIZE`. |
R0.02a Jun 10, 2006 | Added a configuration option `_FS_MINIMUM`. |
R0.02 Jun 01, 2006 | Added FAT12. Removed unbuffered mode. Fixed a problem on small (`<32M`) patition. |
R0.01 Apr 29, 2006 | First release. |