2008-06-09 Pavel Roskin <proski@gnu.org>
* fs/minix.c (grub_minix_mount): Handle error reading superblock.
This commit is contained in:
parent
f5679726cd
commit
40fd3a2b99
2 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-06-09 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* fs/minix.c (grub_minix_mount): Handle error reading
|
||||
superblock.
|
||||
|
||||
2008-06-08 Robert Millan <rmh@aybabtu.com>
|
||||
|
||||
* util/i386/pc/grub-setup.c (main): If install drive is an LVM,
|
||||
|
|
15
fs/minix.c
15
fs/minix.c
|
@ -422,6 +422,8 @@ grub_minix_mount (grub_disk_t disk)
|
|||
/* Read the superblock. */
|
||||
grub_disk_read (disk, GRUB_MINIX_SBLOCK, 0,
|
||||
sizeof (struct grub_minix_sblock),(char *) &data->sblock);
|
||||
if (grub_errno)
|
||||
goto fail;
|
||||
|
||||
if (grub_le_to_cpu16 (data->sblock.magic) == GRUB_MINIX_MAGIC)
|
||||
{
|
||||
|
@ -444,16 +446,17 @@ grub_minix_mount (grub_disk_t disk)
|
|||
data->filename_size = 30;
|
||||
}
|
||||
else
|
||||
{
|
||||
grub_free (data);
|
||||
grub_error (GRUB_ERR_BAD_FS, "not an minix filesystem");
|
||||
return 0;
|
||||
}
|
||||
|
||||
goto fail;
|
||||
|
||||
data->disk = disk;
|
||||
data->linknest = 0;
|
||||
|
||||
return data;
|
||||
|
||||
fail:
|
||||
grub_free (data);
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a minix filesystem");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
Loading…
Reference in a new issue