]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/io/gzio.c (grub_gzio_open): Always return original io if
authorSzymon Janc <szymon@janc.net.pl>
Sat, 20 Aug 2011 09:48:46 +0000 (11:48 +0200)
committerSzymon Janc <szymon@janc.net.pl>
Sat, 20 Aug 2011 09:48:46 +0000 (11:48 +0200)
file type was not recognized correctly (not gzip or corrupted).

ChangeLog
grub-core/io/gzio.c

index d8ad1d63455f231aafef4378c37be5f83e2940bc..17e39bf1595b8b8f69ca9034e838f75ee36556b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-20  Szymon Janc <szymon@janc.net.pl>
+
+       * 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  <phcoder@gmail.com>
 
        * grub-core/kern/mips/loongson/init.c (grub_reboot): Reboot Fuloong.
index 5d3e5332e060333240e9947c5dca1b4e074d2560..7380221aac76b8a932559f1412c0b93834c6441a 100644 (file)
@@ -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;