* grub-core/commands/gptsync.c (grub_cmd_gptsync): Propagate the
relaxation of protective MBR requirements.
This commit is contained in:
parent
b105df76f4
commit
941e3a6d96
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-05-30 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/commands/gptsync.c (grub_cmd_gptsync): Propagate the
|
||||||
|
relaxation of protective MBR requirements.
|
||||||
|
|
||||||
2012-05-29 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-05-29 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* configure.ac: Add condition for COND_HOST_XNU.
|
* configure.ac: Add condition for COND_HOST_XNU.
|
||||||
|
|
|
@ -67,6 +67,7 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
|
||||||
struct grub_partition *partition;
|
struct grub_partition *partition;
|
||||||
grub_disk_addr_t first_sector;
|
grub_disk_addr_t first_sector;
|
||||||
int numactive = 0;
|
int numactive = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (argc < 1)
|
if (argc < 1)
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
|
||||||
|
@ -107,13 +108,15 @@ grub_cmd_gptsync (grub_command_t cmd __attribute__ ((unused)),
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the MBR is a protective MBR and not a normal MBR. */
|
/* Make sure the MBR is a protective MBR and not a normal MBR. */
|
||||||
if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK)
|
for (i = 0; i < 4; i++)
|
||||||
|
if (mbr.entries[i].type == GRUB_PC_PARTITION_TYPE_GPT_DISK)
|
||||||
|
break;
|
||||||
|
if (i == 4)
|
||||||
{
|
{
|
||||||
grub_device_close (dev);
|
grub_device_close (dev);
|
||||||
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found");
|
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found");
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
|
||||||
first_sector = dev->disk->total_sectors;
|
first_sector = dev->disk->total_sectors;
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue