* grub-core/fs/ntfs.c (grub_ntfs_mount): Support 256-byte sectors,

as long as cluster size is multiple of 512 bytes.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-04-25 11:56:24 +02:00
parent a20f6ad048
commit 986748ce79
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2012-04-25 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ntfs.c (grub_ntfs_mount): Support 256-byte sectors,
as long as cluster size is multiple of 512 bytes.
2012-04-23 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrescue.in: Fix locale directory.

View file

@ -948,9 +948,9 @@ grub_ntfs_mount (grub_disk_t disk)
if (grub_memcmp ((char *) &bpb.oem_name, "NTFS", 4))
goto fail;
data->spc = (bpb.sectors_per_cluster
* (grub_le_to_cpu16 (bpb.bytes_per_sector)
>> GRUB_NTFS_BLK_SHR));
data->spc = (((grub_uint32_t) bpb.sectors_per_cluster
* (grub_uint32_t) grub_le_to_cpu16 (bpb.bytes_per_sector))
>> GRUB_NTFS_BLK_SHR);
if (bpb.clusters_per_mft > 0)
data->mft_size = data->spc * bpb.clusters_per_mft;