* grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Use device size from

first superblock to find the second one when possible.
This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2012-01-25 15:09:00 +01:00
1 parent 9e88df393a
commit ff4479581d
2 files changed
+10 -1

No files matched your search

+5 -1
View File
@@ -734,7 +734,11 @@ grub_nilfs2_load_sb (struct grub_nilfs2_data *data)
/* Make sure if 1st super block is valid. */
valid[0] = grub_nilfs2_valid_sb (&data->sblock);
partition_size = grub_disk_get_size (disk);
if (valid[0])
partition_size = (grub_le_to_cpu64 (data->sblock.s_dev_size)
>> GRUB_DISK_SECTOR_BITS);
else
partition_size = grub_disk_get_size (disk);
if (partition_size != GRUB_DISK_SIZE_UNKNOWN)
{
/* Read second super block. */