diff options
author | Dmitrii Merkurev <dimorinny@google.com> | 2022-11-17 19:18:32 +0000 |
---|---|---|
committer | Dmitrii Merkurev <dimorinny@google.com> | 2022-11-17 19:47:58 +0000 |
commit | 32c51e05eb961f3d2b55ebdab7556b9cbae09e33 (patch) | |
tree | 872cc26602b8994b786ab4afbae2d28890ac62cf | |
parent | 9b632a08d9b1d4aebda90a9a3a397ed1e7ab68af (diff) | |
download | mtools-32c51e05eb961f3d2b55ebdab7556b9cbae09e33.tar.gz |
Introduce mock codepages config option for mtools
We're using arm64 version of mmd to generate ESP
image for cuttlefish boot. But AOSP only supports bionic
libc for arm64, so introduce here mock codepages to use it
instead of glibc specific iconv library. It introduces additional
limitations that every path inside msdos partition must only
contain symbols between ' ' and '~' that we're ok with.
Bug: 227660047
Test: launch_cvd on x86 and aarm64 to verify ESP image is correct
Change-Id: Ieae82efdafbd055e062afc964d1118e7c87473a6
-rw-r--r-- | codepages.c | 9 | ||||
-rw-r--r-- | config.h | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/codepages.c b/codepages.c index ecb99ee..944131c 100644 --- a/codepages.c +++ b/codepages.c @@ -20,6 +20,13 @@ #ifndef HAVE_ICONV_H #include "codepage.h" +#ifdef USE_MOCK_CODEPAGES +Codepage_t codepages[]= { + { 850, + "" + }, +}; +#else Codepage_t codepages[]= { { 437, "ÇüéâäàåçêëèïîìÄÅ" @@ -113,6 +120,8 @@ Codepage_t codepages[]= { { 0 } }; +#endif + #else /* Should down ISO C forbids an empty translation unit warning [-Wpedantic]: */ typedef int make_iso_compilers_happy; @@ -53,7 +53,10 @@ #define HAVE_HTONS 1 /* Define to 1 if you have the <iconv.h> header file. */ -#define HAVE_ICONV_H 1 +/* #undef HAVE_ICONV_H */ + +/* Define to 1 if you want to use mock code pages. */ +#define USE_MOCK_CODEPAGES 1 /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 |