+2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * 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 :.
+
2012-01-14 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Refise build qemu_mips w/o unifont.
for (iptr = from; iptr < from + len && *iptr; iptr++)
{
+ /* Translate '/' to ':' as per HFS spec. */
+ if (*iptr == '/')
+ {
+ *optr++ = ':';
+ continue;
+ }
if (!(*iptr & 0x80))
{
*optr++ = *iptr;
while (*iptr && optr < end)
{
int i, clen;
+ /* Translate ':' to '/' as per HFS spec. */
+ if (*iptr == ':')
+ {
+ *optr++ = '/';
+ iptr++;
+ continue;
+ }
if (!(*iptr & 0x80))
{
*optr++ = *iptr++;
{
catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
+ if (catkey->name[i] == '/')
+ catkey->name[i] = ':';
+
/* If the name is obviously invalid, skip this node. */
if (catkey->name[i] == 0)
return 0;
/* Restore the byte order to what it was previously. */
for (i = 0; i < grub_be_to_cpu16 (catkey->namelen); i++)
- catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
+ {
+ if (catkey->name[i] == ':')
+ catkey->name[i] = '/';
+ catkey->name[i] = grub_be_to_cpu16 (catkey->name[i]);
+ }
/* hfs+ is case insensitive. */
if (! dir->data->case_sensitive)