]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-setup.c (setup): Fix incorrect container semantics.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 15 Sep 2010 22:27:06 +0000 (00:27 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 15 Sep 2010 22:27:06 +0000 (00:27 +0200)
ChangeLog
util/grub-setup.c

index 0b3d7627cd560581f06854cd11279549567a2ea4..0696c38b3826b9a1b7139f42374f1997ae068529 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-setup.c (setup): Fix incorrect container semantics.
+
 2010-09-15  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/commands/parttool.c (grub_cmd_parttool): Fix a variable
index c9ab5cfdbe66e6925d26c927d1af51f9a0c88e6f..1bf0d958d43bbabb366d361a973fda653e6f04c4 100644 (file)
@@ -333,7 +333,7 @@ setup (const char *dir,
 #ifdef GRUB_MACHINE_PCBIOS
   {
     grub_partition_map_t dest_partmap = NULL;
-    grub_partition_map_t container = dest_dev->disk->partition;
+    grub_partition_t container = dest_dev->disk->partition;
     int multiple_partmaps = 0;
     grub_err_t err;
     grub_disk_addr_t sectors[core_sectors];
@@ -454,11 +454,6 @@ setup (const char *dir,
                       : GRUB_DISK_SECTOR_SIZE,
                       core_img + i * GRUB_DISK_SECTOR_SIZE);
 
-    /* Write the boot image onto the disk.  */
-    if (grub_disk_write (dest_dev->disk, 0, 0, GRUB_DISK_SECTOR_SIZE,
-                        boot_img))
-      grub_util_error ("%s", grub_errmsg);
-
     goto finish;
   }
 #endif
@@ -630,12 +625,13 @@ unable_to_embed:
   grub_util_write_image (core_img, GRUB_DISK_SECTOR_SIZE * 2, fp);
   fclose (fp);
 
+ finish:
+
   /* Write the boot image onto the disk.  */
   if (grub_disk_write (dest_dev->disk, BOOT_SECTOR,
                       0, GRUB_DISK_SECTOR_SIZE, boot_img))
     grub_util_error ("%s", grub_errmsg);
 
- finish:
 
   /* Sync is a Good Thing.  */
   sync ();