R0.15 patch 3
August 15, 2023 f_setlabel function fails when set a volume label in Unix style volume ID. This problem was reported via an email.
This commit is contained in:
+5
-1
@@ -1,5 +1,5 @@
|
|||||||
/*----------------------------------------------------------------------------/
|
/*----------------------------------------------------------------------------/
|
||||||
/ FatFs - Generic FAT Filesystem Module R0.15 w/patch2 /
|
/ FatFs - Generic FAT Filesystem Module R0.15 w/patch3 /
|
||||||
/-----------------------------------------------------------------------------/
|
/-----------------------------------------------------------------------------/
|
||||||
/
|
/
|
||||||
/ Copyright (C) 2022, ChaN, all right reserved.
|
/ Copyright (C) 2022, ChaN, all right reserved.
|
||||||
@@ -5462,6 +5462,10 @@ FRESULT f_setlabel (
|
|||||||
/* Get logical drive */
|
/* Get logical drive */
|
||||||
res = mount_volume(&label, &fs, FA_WRITE);
|
res = mount_volume(&label, &fs, FA_WRITE);
|
||||||
if (res != FR_OK) LEAVE_FF(fs, res);
|
if (res != FR_OK) LEAVE_FF(fs, res);
|
||||||
|
#if FF_STR_VOLUME_ID == 2
|
||||||
|
for ( ; *label == '/'; label++) ; /* Snip the separators off */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if FF_FS_EXFAT
|
#if FF_FS_EXFAT
|
||||||
if (fs->fs_type == FS_EXFAT) { /* On the exFAT volume */
|
if (fs->fs_type == FS_EXFAT) { /* On the exFAT volume */
|
||||||
|
|||||||
Reference in New Issue
Block a user