]> git.proxmox.com Git - grub2.git/commitdiff
* util/grub-setup.c (setup) [!__linux__]: Add missing file declaration
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 29 Feb 2012 13:07:53 +0000 (14:07 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 29 Feb 2012 13:07:53 +0000 (14:07 +0100)
and grub_file_close call.

ChangeLog
util/grub-setup.c

index 51ea4d5dd0eba5f4dd5d32282db774c18e4b1d5f..3b6ceaaaa44733d4add8c2b047cf49e41d9a1f49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-02-29  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-setup.c (setup) [!__linux__]: Add missing file declaration
+       and grub_file_close call.
+
 2012-02-29  Vladimir Serbinenko  <phcoder@gmail.com>
 
        Add LZSS Mach-O support (needed for new xnu kernelcache).
index 300994cc93b21a8403780ca88dbf1a0697e1b1a6..c2a4335e0eda32c38b315298b74152152bbcffc8 100644 (file)
@@ -799,6 +799,7 @@ unable_to_embed:
   }
 #else
   {
+    grub_file_t file;
     /* Now read the core image to determine where the sectors are.  */
     grub_file_filter_disable_compression ();
     file = grub_file_open (core_path_dev);
@@ -815,6 +816,7 @@ unable_to_embed:
     if (grub_file_read (file, tmp_img, core_size - GRUB_DISK_SECTOR_SIZE)
        != (grub_ssize_t) core_size - GRUB_DISK_SECTOR_SIZE)
       grub_util_error ("%s", _("failed to read the rest sectors of the core image"));
+    grub_file_close (file);
   }
 #endif