summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
diff options
context:
space:
mode:
authorRoman Artiukhin <bahusdrive@gmail.com>2024-06-03 16:03:19 +0300
committerSolomon Peachy <pizza@shaftnet.org>2024-06-04 19:29:19 -0400
commit2109d524e86b50a181923df2407f039d3d512fa5 (patch)
tree4b1ee19973302bb5a283c65d55921ba36660a46e /firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
parentfb39d852b0bf8fe6673b4531c17cc73094dc3ab0 (diff)
downloadrockbox-2109d524e86b50a181923df2407f039d3d512fa5.tar.gz
rockbox-2109d524e86b50a181923df2407f039d3d512fa5.zip
samsung yp-r0: Fix displaying non-Latin filenames on SD card
Supply iocharset=utf8 mount option. Otherwise, cyrillic symbols appear as question marks. Change-Id: Ibf40a15ff429cfe2bf6e7970330870505e2470b7
Diffstat (limited to 'firmware/target/hosted/samsungypr/ypr0/system-ypr0.c')
-rw-r--r--firmware/target/hosted/samsungypr/ypr0/system-ypr0.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
index 2544174252..ee6dc48070 100644
--- a/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
+++ b/firmware/target/hosted/samsungypr/ypr0/system-ypr0.c
@@ -139,11 +139,9 @@ static int mount_sd(void)
139 /* kludge to make sure we get our wanted mount flags. This is needed 139 /* kludge to make sure we get our wanted mount flags. This is needed
140 * when the sd was already mounted before we booted */ 140 * when the sd was already mounted before we booted */
141 unmount_sd(); 141 unmount_sd();
142 char iocharset[64] = "iocharset=";
143 strlcat(iocharset, get_current_codepage_name_linux(), sizeof(iocharset));
144 ret = mount("/dev/mmcblk0p1", "/mnt/mmc", "vfat", 142 ret = mount("/dev/mmcblk0p1", "/mnt/mmc", "vfat",
145 MS_MGC_VAL | MS_SYNCHRONOUS | MS_RELATIME, 143 MS_MGC_VAL | MS_SYNCHRONOUS | MS_RELATIME,
146 iocharset); 144 "iocharset=utf8");
147 /* failure probably means the kernel does not support the iocharset. 145 /* failure probably means the kernel does not support the iocharset.
148 * retry without to load the default */ 146 * retry without to load the default */
149 if (ret == -1) 147 if (ret == -1)