From 4f0ad02936bf2bd73ef10cc811982e2302743aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= Date: Sat, 20 Jul 2013 18:06:57 +0200 Subject: [PATCH] Unbreak access to netbsd and openbsd partitions. --- ChangeLog | 5 +++++ grub-core/partmap/bsdlabel.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dfd0558cb..c59c2968f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-20 Grégoire Sutre + + * grub-core/partmap/bsdlabel.c (netopenbsdlabel_partition_map_iterate): + Fix misuse of variable count. + 2013-07-18 Leif Lindholm 2013-07-18 Francesco Lavra 2013-07-18 Vladimir Serbinenko diff --git a/grub-core/partmap/bsdlabel.c b/grub-core/partmap/bsdlabel.c index 16b9c878d..cf0f967c1 100644 --- a/grub-core/partmap/bsdlabel.c +++ b/grub-core/partmap/bsdlabel.c @@ -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;