Skip to content

Commit

Permalink
Set FF_FS_RPATH to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Feb 4, 2024
1 parent 1a144ff commit b345f94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions libslim/source/ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3911,8 +3911,7 @@ FRESULT f_open (
}
fp->clust = clst;
if (res == FR_OK && ofs % SS(fs)) { /* Fill sector buffer if not on the sector boundary */
sc = clst2sect(fs, clst);
if (sc == 0) {
if ((sc = clst2sect(fs, clst)) == 0) {
res = FR_INT_ERR;
} else {
fp->sect = sc + (DWORD)(ofs / SS(fs));
Expand Down
6 changes: 3 additions & 3 deletions libslim/source/ffconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@
/* The FF_USE_LFN switches the support for LFN (long file name).
/
/ 0: Disable LFN. FF_MAX_LFN has no effect.
/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
/ 1: Enable LFN with static working buffer on the BSS. Always NOT thread-safe.
/ 2: Enable LFN with dynamic working buffer on the STACK.
/ 3: Enable LFN with dynamic working buffer on the HEAP.
/
/ To enable the LFN, ffunicode.c needs to be added to the project. The LFN function
/ requiers certain internal working buffer occupies (FF_MAX_LFN + 1) * 2 bytes and
/ additional (FF_MAX_LFN + 44) / 15 * 32 bytes when exFAT is enabled.
/ The FF_MAX_LFN defines size of the working buffer in UTF-16 code unit and it can
/ be in range of 12 to 255. It is recommended to be set it 255 to fully support LFN
/ be in range of 12 to 255. It is recommended to be set 255 to fully support LFN
/ specification.
/ When use stack for the working buffer, take care on stack overflow. When use heap
/ memory for the working buffer, memory management functions, ff_memalloc() and
Expand Down Expand Up @@ -152,7 +152,7 @@
*/


#define FF_FS_RPATH 1
#define FF_FS_RPATH 2
/* This option configures support for relative path.
/
/ 0: Disable relative path and remove related functions.
Expand Down

0 comments on commit b345f94

Please sign in to comment.