* grub-core/fs/affs.c (grub_affs_mount): Read data->bblock.rootblock
rather than assuming than rootblock is exactly in the middle. (grub_affs_label): Likewise.
This commit is contained in:
parent
b85812b06f
commit
b070525d03
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2010-12-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/affs.c (grub_affs_mount): Read data->bblock.rootblock
|
||||||
|
rather than assuming than rootblock is exactly in the middle.
|
||||||
|
(grub_affs_label): Likewise.
|
||||||
|
|
||||||
2010-12-19 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-12-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/affs.c (grub_affs_fs) [GRUB_UTIL]: Explicitly set
|
* grub-core/fs/affs.c (grub_affs_fs) [GRUB_UTIL]: Explicitly set
|
||||||
|
|
|
@ -208,7 +208,7 @@ grub_affs_mount (grub_disk_t disk)
|
||||||
rblock = (struct grub_affs_rblock *) rootblock;
|
rblock = (struct grub_affs_rblock *) rootblock;
|
||||||
|
|
||||||
/* Read the rootblock. */
|
/* Read the rootblock. */
|
||||||
grub_disk_read (disk, (disk->total_sectors >> 1) + blocksize, 0,
|
grub_disk_read (disk, grub_be_to_cpu32 (data->bblock.rootblock), 0,
|
||||||
GRUB_DISK_SECTOR_SIZE * 16, rootblock);
|
GRUB_DISK_SECTOR_SIZE * 16, rootblock);
|
||||||
if (grub_errno)
|
if (grub_errno)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -240,7 +240,7 @@ grub_affs_mount (grub_disk_t disk)
|
||||||
data->disk = disk;
|
data->disk = disk;
|
||||||
data->htsize = grub_be_to_cpu32 (rblock->htsize);
|
data->htsize = grub_be_to_cpu32 (rblock->htsize);
|
||||||
data->diropen.data = data;
|
data->diropen.data = data;
|
||||||
data->diropen.block = (disk->total_sectors >> 1);
|
data->diropen.block = grub_be_to_cpu32 (data->bblock.rootblock);
|
||||||
|
|
||||||
grub_free (rootblock);
|
grub_free (rootblock);
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ grub_affs_label (grub_device_t device, char **label)
|
||||||
{
|
{
|
||||||
/* The rootblock maps quite well on a file header block, it's
|
/* The rootblock maps quite well on a file header block, it's
|
||||||
something we can use here. */
|
something we can use here. */
|
||||||
grub_disk_read (data->disk, disk->total_sectors >> 1,
|
grub_disk_read (data->disk, grub_be_to_cpu32 (data->bblock.rootblock),
|
||||||
data->blocksize * (GRUB_DISK_SECTOR_SIZE
|
data->blocksize * (GRUB_DISK_SECTOR_SIZE
|
||||||
- GRUB_AFFS_FILE_LOCATION),
|
- GRUB_AFFS_FILE_LOCATION),
|
||||||
sizeof (file), &file);
|
sizeof (file), &file);
|
||||||
|
|
Loading…
Reference in a new issue