* grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
as 1024 in block size field. Found on one of my test images. Small optimisation while on it.
This commit is contained in:
parent
ec000eaca9
commit
b2d004db18
2 changed files with 18 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-12-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
|
||||||
|
as 1024 in block size field. Found on one of my test images.
|
||||||
|
Small optimisation while on it.
|
||||||
|
|
||||||
2011-12-25 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-12-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
|
* docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
|
||||||
|
|
|
@ -480,12 +480,18 @@ grub_minix_mount (grub_disk_t disk)
|
||||||
data->disk = disk;
|
data->disk = disk;
|
||||||
data->linknest = 0;
|
data->linknest = 0;
|
||||||
#ifdef MODE_MINIX3
|
#ifdef MODE_MINIX3
|
||||||
if ((grub_le_to_cpu16 (data->sblock.block_size)
|
/* These tests are endian-independent. No need to byteswap. */
|
||||||
& (grub_le_to_cpu16 (data->sblock.block_size) - 1))
|
if (data->sblock.block_size == 0xffff)
|
||||||
|| grub_le_to_cpu16 (data->sblock.block_size) == 0)
|
data->log_block_size = 10;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((data->sblock.block_size & (data->sblock.block_size - 1))
|
||||||
|
|| data->sblock.block_size == 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
for (data->log_block_size = 0; (1 << data->log_block_size)
|
for (data->log_block_size = 0; (1 << data->log_block_size)
|
||||||
< grub_le_to_cpu16 (data->sblock.block_size); data->log_block_size++);
|
< grub_le_to_cpu16 (data->sblock.block_size);
|
||||||
|
data->log_block_size++);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
data->log_block_size = 10;
|
data->log_block_size = 10;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue