]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Unbreak access to netbsd and openbsd partitions.
authorGrégoire Sutre <gregoire.sutre@gmail.com>
Sat, 20 Jul 2013 16:06:57 +0000 (18:06 +0200)
committerGrégoire Sutre <gregoire.sutre@gmail.com>
Sat, 20 Jul 2013 16:06:57 +0000 (18:06 +0200)
ChangeLog
grub-core/partmap/bsdlabel.c

index dfd0558cbb8506850db372383925c721cc981bba..c59c2968f19ec40a00bf3093dd41f5c01e51b02d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
index 16b9c878d1ccd19757c4345f1899cfe4c1941776..cf0f967c1fa7fc6fc6c51694c175bacd80bf680f 100644 (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;