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
This commit is contained in:
Roman Artiukhin 2024-06-03 16:03:19 +03:00 committed by Solomon Peachy
parent fb39d852b0
commit 2109d524e8

View file

@ -139,11 +139,9 @@ static int mount_sd(void)
/* kludge to make sure we get our wanted mount flags. This is needed /* kludge to make sure we get our wanted mount flags. This is needed
* when the sd was already mounted before we booted */ * when the sd was already mounted before we booted */
unmount_sd(); unmount_sd();
char iocharset[64] = "iocharset=";
strlcat(iocharset, get_current_codepage_name_linux(), sizeof(iocharset));
ret = mount("/dev/mmcblk0p1", "/mnt/mmc", "vfat", ret = mount("/dev/mmcblk0p1", "/mnt/mmc", "vfat",
MS_MGC_VAL | MS_SYNCHRONOUS | MS_RELATIME, MS_MGC_VAL | MS_SYNCHRONOUS | MS_RELATIME,
iocharset); "iocharset=utf8");
/* failure probably means the kernel does not support the iocharset. /* failure probably means the kernel does not support the iocharset.
* retry without to load the default */ * retry without to load the default */
if (ret == -1) if (ret == -1)