* grub-core/fs/zfs/zfs.c (read_dva): Issue an error if read failed

with no error set.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-11-08 20:03:06 +01:00
parent 49a45021c1
commit 438a746a3f
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-11-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs.c (read_dva): Issue an error if read failed
with no error set.
2011-11-08 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/LzmaEnc.c (LzmaEnc_CodeOneBlock): Remove set but not

View file

@ -1324,7 +1324,7 @@ read_dva (const dva_t *dva,
{
grub_uint64_t offset;
unsigned i;
grub_err_t err;
grub_err_t err = 0;
int try = 0;
offset = dva_get_offset (dva, endian);
@ -1344,6 +1344,9 @@ read_dva (const dva_t *dva,
if (err)
return err;
}
if (!err)
return grub_error (GRUB_ERR_BAD_FS, "unknown device %d",
(int) DVA_GET_VDEV (dva));
return err;
}