mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 15:49:23 +00:00
* grub-core/fs/sfs.c (grub_sfs_read_symlink): Convert latin1 into
UTF-8.
This commit is contained in:
1 parent
2f48221f5c
commit
7dceec9b69
2 files changed
+14
-5
No files matched your search
@@ -1,3 +1,8 @@
|
|||||||
|
2012-05-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/sfs.c (grub_sfs_read_symlink): Convert latin1 into
|
||||||
|
UTF-8.
|
||||||
|
|
||||||
2012-05-07 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-05-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/affs.c (grub_affs_iterate_dir): Mark as case insensitive.
|
* grub-core/fs/affs.c (grub_affs_iterate_dir): Mark as case insensitive.
|
||||||
|
|||||||
+9
-5
@@ -447,12 +447,16 @@ grub_sfs_read_symlink (grub_fshelp_node_t node)
|
|||||||
|
|
||||||
/* This is just a wild guess, but it always worked for me. How the
|
/* This is just a wild guess, but it always worked for me. How the
|
||||||
SLNK block looks like is not documented in the SFS docs. */
|
SLNK block looks like is not documented in the SFS docs. */
|
||||||
symlink = grub_strndup (&block[24],
|
symlink = grub_malloc (((GRUB_DISK_SECTOR_SIZE << data->log_blocksize)
|
||||||
(GRUB_DISK_SECTOR_SIZE << data->log_blocksize) - 24);
|
- 24) * GRUB_MAX_UTF8_PER_LATIN1 + 1);
|
||||||
grub_free (block);
|
|
||||||
if (!symlink)
|
if (!symlink)
|
||||||
return 0;
|
{
|
||||||
|
grub_free (block);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
*grub_latin1_to_utf8 ((grub_uint8_t *) symlink, (grub_uint8_t *) &block[24],
|
||||||
|
(GRUB_DISK_SECTOR_SIZE << data->log_blocksize) - 24) = '\0';
|
||||||
|
grub_free (block);
|
||||||
return symlink;
|
return symlink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user