mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
* grub-core/fs/hfs.c (macroman_to_utf8): Convert / to :.
(utf8_to_macroman): Do the opposite. * grub-core/fs/hfsplus.c (grub_hfsplus_iterate_dir): Convert / to :.
This commit is contained in:
1 parent
64e3f8f6fe
commit
76df2068c4
3 files changed
+27
-1
No files matched your search
@@ -1004,6 +1004,12 @@ macroman_to_utf8 (char *to, const grub_uint8_t *from, grub_size_t len)
|
||||
|
||||
for (iptr = from; iptr < from + len && *iptr; iptr++)
|
||||
{
|
||||
/* Translate '/' to ':' as per HFS spec. */
|
||||
if (*iptr == '/')
|
||||
{
|
||||
*optr++ = ':';
|
||||
continue;
|
||||
}
|
||||
if (!(*iptr & 0x80))
|
||||
{
|
||||
*optr++ = *iptr;
|
||||
@@ -1024,6 +1030,13 @@ utf8_to_macroman (grub_uint8_t *to, const char *from)
|
||||
while (*iptr && optr < end)
|
||||
{
|
||||
int i, clen;
|
||||
/* Translate ':' to '/' as per HFS spec. */
|
||||
if (*iptr == ':')
|
||||
{
|
||||
*optr++ = '/';
|
||||
iptr++;
|
||||
continue;
|
||||
}
|
||||
if (!(*iptr & 0x80))
|
||||
{
|
||||
*optr++ = *iptr++;
|
||||
|
||||
Reference in new issue
Block a user