* util/grub-setup.c (setup): Fix incorrect container semantics.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-16 00:27:06 +02:00
parent 35139e8a55
commit cb731b5e81
2 changed files with 7 additions and 7 deletions

View file

@ -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

View 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 ();