fatfs v0.13c October 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)
This commit is contained in:
savelij13 committed 2025-09-11 10:35:10 +03:00
1 parent 7b4dceffab
commit 7cb0c2d1e6
29 files changed
+369 -263

No files matched your search

+6 -6
View File
@@ -118,7 +118,7 @@ int main (void)
fr = <em>f_open</em>(&amp;fil, "message.txt", FA_READ);
if (fr) return (int)fr;
<span class="c">/* Read all lines and display it */</span>
<span class="c">/* Read every line and display it */</span>
while (f_gets(line, sizeof line, &amp;fil)) {
printf(line);
}
@@ -134,7 +134,7 @@ int main (void)
int main (void)
{
FATFS fs[2]; <span class="c">/* Work area (filesystem object) for logical drives */</span>
FATFS fs0, fs1; <span class="c">/* Work area (filesystem object) for logical drives */</span>
FIL fsrc, fdst; <span class="c">/* File objects */</span>
BYTE buffer[4096]; <span class="c">/* File copy buffer */</span>
FRESULT fr; <span class="c">/* FatFs function common result code */</span>
@@ -142,8 +142,8 @@ int main (void)
<span class="c">/* Register work area for each logical drive */</span>
f_mount(&amp;fs[0], "0:", 0);
f_mount(&amp;fs[1], "1:", 0);
f_mount(&amp;fs0, "0:", 0);
f_mount(&amp;fs1, "1:", 0);
<span class="c">/* Open source file on the drive 1 */</span>
fr = <em>f_open</em>(&amp;fsrc, "1:file.bin", FA_READ);
@@ -166,8 +166,8 @@ int main (void)
f_close(&amp;fdst);
<span class="c">/* Unregister work area prior to discard it */</span>
f_mount(NULL, "0:", 0);
f_mount(NULL, "1:", 0);
f_mount(0, "0:", 0);
f_mount(0, "1:", 0);
return (int)fr;
}