mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-17 20:17:37 -04:00
Disable legacy codepage handling in bootloaders
Turn off legacy codepage handling in the filesystem code for bootloaders, and support ISO-8859-1 (Latin-1) only. This only affects DOS 8.3 filename parsing when FAT32 long names are unavailable; long names are Unicode and can always be decoded properly regardless of this setting. In reality, bootloaders never supported codepages other than Latin-1 in the first place. They did contain the code to load codepages from disk, but had no way to actually change the codepage away from Latin-1. Compiling out this useless codepage handling code frees up precious space for very size-constrained bootloaders like the Sansa e200v2. Change-Id: I26b049dd648fed4a0cc61fa938faa84e9816ab7d
This commit is contained in:
parent
4f652b49ae
commit
7dc8d754a2
2 changed files with 18 additions and 0 deletions
|
@ -223,6 +223,7 @@ int test_dir_empty_internal(struct filestr_base *stream)
|
||||||
/* iso decode the name to UTF-8 */
|
/* iso decode the name to UTF-8 */
|
||||||
void iso_decode_d_name(char *d_name)
|
void iso_decode_d_name(char *d_name)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_FILESYSTEM_CODEPAGE
|
||||||
if (is_dotdir_name(d_name))
|
if (is_dotdir_name(d_name))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -232,6 +233,9 @@ void iso_decode_d_name(char *d_name)
|
||||||
/* This MUST be the default codepage thus not something that could be
|
/* This MUST be the default codepage thus not something that could be
|
||||||
loaded on call */
|
loaded on call */
|
||||||
iso_decode(shortname, d_name, -1, len + 1);
|
iso_decode(shortname, d_name, -1, len + 1);
|
||||||
|
#else
|
||||||
|
(void)d_name;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_DIRCACHE
|
#ifdef HAVE_DIRCACHE
|
||||||
|
|
|
@ -1343,6 +1343,20 @@ Lyre prototype 1 */
|
||||||
# define HAVE_PERCEPTUAL_VOLUME
|
# define HAVE_PERCEPTUAL_VOLUME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Turn off legacy codepage handling in the filesystem code for bootloaders,
|
||||||
|
* and support ISO-8859-1 (Latin-1) only. This only affects DOS 8.3 filename
|
||||||
|
* parsing when FAT32 long names are unavailable; long names are Unicode and
|
||||||
|
* can always be decoded properly regardless of this setting.
|
||||||
|
*
|
||||||
|
* In reality, bootloaders never supported codepages other than Latin-1 in
|
||||||
|
* the first place. They did contain the code to load codepages from disk,
|
||||||
|
* but had no way to actually change the codepage away from Latin-1.
|
||||||
|
*/
|
||||||
|
#if !defined(BOOTLOADER)
|
||||||
|
# define HAVE_FILESYSTEM_CODEPAGE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* null audiohw setting macro for when codec header is included for reasons
|
/* null audiohw setting macro for when codec header is included for reasons
|
||||||
other than audio support */
|
other than audio support */
|
||||||
#define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...)
|
#define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue