]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
merge trunk
authorColin Watson <cjwatson@ubuntu.com>
Tue, 4 Jan 2011 15:41:07 +0000 (15:41 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 4 Jan 2011 15:41:07 +0000 (15:41 +0000)
1  2 
Makefile.util.def
grub-core/Makefile.core.def
grub-core/io/gzio.c

Simple merge
Simple merge
index 248a1750e2ad9be8c1d9e0283bc6a9f3f0053062,f563d7b92c55882dbb227addbe66343cd3210f4f..8b813fed3991361659d92e9b3a759f97fbd2abf8
@@@ -216,21 -212,20 +216,20 @@@ test_gzip_header (grub_file_t file
  
    gzio->data_offset = grub_file_tell (gzio->file);
  
-   grub_file_seek (gzio->file, grub_file_size (gzio->file) - 4);
-   if (grub_file_seekable (gzio->file))
-     {
-       if (grub_file_read (gzio->file, &orig_len, 4) != 4)
-       {
-         grub_error (GRUB_ERR_BAD_FILE_TYPE, "unsupported gzip format");
-         return 0;
-       }
-     }
-   /* FIXME: this does not handle files whose original size is over 4GB.
-      But how can we know the real original size?  */
-   file->size = grub_le_to_cpu32 (orig_len);
+   /* FIXME: don't do this on not easily seekable files.  */
+   {
+     grub_file_seek (gzio->file, grub_file_size (gzio->file) - 4);
+     if (grub_file_read (gzio->file, &orig_len, 4) != 4)
+       {
+       grub_error (GRUB_ERR_BAD_FILE_TYPE, "unsupported gzip format");
+       return 0;
+       }
+     /* FIXME: this does not handle files whose original size is over 4GB.
+        But how can we know the real original size?  */
+     file->size = grub_le_to_cpu32 (orig_len);
+   }
  
 -  initialize_tables (file);
 +  initialize_tables (gzio);
  
    return 1;
  }