Unbreak access to netbsd and openbsd partitions.

This commit is contained in:
Grégoire Sutre 2013-07-20 18:06:57 +02:00
parent 43d53b72c9
commit 4f0ad02936
2 changed files with 7 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2013-07-20 Grégoire Sutre <gregoire.sutre@gmail.com>
* grub-core/partmap/bsdlabel.c (netopenbsdlabel_partition_map_iterate):
Fix misuse of variable count.
2013-07-18 Leif Lindholm <leif.lindholm@arm.com>
2013-07-18 Francesco Lavra <francescolavra.fl@gmail.com>
2013-07-18 Vladimir Serbinenko <phcoder@gmail.com>

View file

@ -189,8 +189,6 @@ netopenbsdlabel_partition_map_iterate (grub_disk_t disk, grub_uint8_t type,
grub_partition_iterate_hook_t hook,
void *hook_data)
{
int count = 0;
if (disk->partition && grub_strcmp (disk->partition->partmap->name, "msdos")
== 0)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported");
@ -201,7 +199,7 @@ netopenbsdlabel_partition_map_iterate (grub_disk_t disk, grub_uint8_t type,
.pmap = pmap,
.hook = hook,
.hook_data = hook_data,
.count = count
.count = 0
};
grub_err_t err;
@ -209,7 +207,7 @@ netopenbsdlabel_partition_map_iterate (grub_disk_t disk, grub_uint8_t type,
if (err)
return err;
if (!count)
if (!ctx.count)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no bsdlabel found");
}
return GRUB_ERR_NONE;