diff --git a/ChangeLog b/ChangeLog index b7bd30183..f8f424176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-08 Vladimir Serbinenko + + * grub-core/fs/zfs/zfs.c (read_dva): Issue an error if read failed + with no error set. + 2011-11-08 Vladimir Serbinenko * grub-core/lib/LzmaEnc.c (LzmaEnc_CodeOneBlock): Remove set but not diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c index fb16a009b..f85d56e99 100644 --- a/grub-core/fs/zfs/zfs.c +++ b/grub-core/fs/zfs/zfs.c @@ -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; }