From a5219af18967bcca59478a4515b36c77caa814bd Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Sat, 20 Aug 2011 11:48:46 +0200 Subject: [PATCH] * grub-core/io/gzio.c (grub_gzio_open): Always return original io if file type was not recognized correctly (not gzip or corrupted). --- ChangeLog | 5 +++++ grub-core/io/gzio.c | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8ad1d634..17e39bf15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-20 Szymon Janc + + * grub-core/io/gzio.c (grub_gzio_open): Always return original io if + file type was not recognized correctly (not gzip or corrupted). + 2011-08-19 Vladimir Serbinenko * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong. diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c index 5d3e5332e..7380221aa 100644 --- a/grub-core/io/gzio.c +++ b/grub-core/io/gzio.c @@ -1179,12 +1179,9 @@ grub_gzio_open (grub_file_t io) grub_free (gzio); grub_free (file); grub_file_seek (io, 0); + grub_errno = GRUB_ERR_NONE; - if (grub_errno == GRUB_ERR_BAD_FILE_TYPE) - { - grub_errno = GRUB_ERR_NONE; - return io; - } + return io; } return file;