The "don't use variable names that differ only one character" commit.

2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>

	* disk/lvm.c: Rename VGS to VG_LIST.
	(grub_lvm_iterate): Change VGS->LV to VG-LV.
	(grub_lvm_open): Likewise.
	Thanks to Michael Guntsche for finding this bug.
This commit is contained in:
jeroen 2006-10-18 21:42:42 +00:00
parent 5d74d927f6
commit 4d42b77f3f
3 changed files with 17 additions and 9 deletions

View file

@ -1,3 +1,10 @@
2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
* disk/lvm.c: Rename VGS to VG_LIST.
(grub_lvm_iterate): Change VGS->LV to VG-LV.
(grub_lvm_open): Likewise.
Thanks to Michael Guntsche for finding this bug.
2006-10-15 Yoshinori K. Okuji <okuji@enbug.org> 2006-10-15 Yoshinori K. Okuji <okuji@enbug.org>
* configure.ac (AC_INIT): Bumped to 1.95. * configure.ac (AC_INIT): Bumped to 1.95.

3
THANKS
View file

@ -12,7 +12,8 @@ Harley D. Eades III <hde@foobar-qux.org>
Hollis Blanchard <hollis@penguinppc.org> Hollis Blanchard <hollis@penguinppc.org>
Jeroen Dekkers <jeroen@dekkers.cx> Jeroen Dekkers <jeroen@dekkers.cx>
Johan Rydberg <jrydberg@gnu.org> Johan Rydberg <jrydberg@gnu.org>
Marco Gerards <metgerards@student.han.nl> Marco Gerards <marco@gnu.org>
Michael Guntsche <mike@it-loops.com>
NIIBE Yutaka <gniibe@m17n.org> NIIBE Yutaka <gniibe@m17n.org>
Omniflux <omniflux@omniflux.com> Omniflux <omniflux@omniflux.com>
Robert Bihlmeyer <robbe@orcus.priv.at> Robert Bihlmeyer <robbe@orcus.priv.at>

View file

@ -25,7 +25,7 @@
#include <grub/misc.h> #include <grub/misc.h>
#include <grub/lvm.h> #include <grub/lvm.h>
static struct grub_lvm_vg *vgs; static struct grub_lvm_vg *vg_list;
static int lv_count; static int lv_count;
@ -42,10 +42,10 @@ static int
grub_lvm_iterate (int (*hook) (const char *name)) grub_lvm_iterate (int (*hook) (const char *name))
{ {
struct grub_lvm_vg *vg; struct grub_lvm_vg *vg;
for (vg = vgs; vg; vg = vg->next) for (vg = vg_list; vg; vg = vg->next)
{ {
struct grub_lvm_lv *lv; struct grub_lvm_lv *lv;
for (lv = vgs->lvs; lv; lv = lv->next) for (lv = vg->lvs; lv; lv = lv->next)
if (hook (lv->name)) if (hook (lv->name))
return 1; return 1;
} }
@ -58,9 +58,9 @@ grub_lvm_open (const char *name, grub_disk_t disk)
{ {
struct grub_lvm_vg *vg; struct grub_lvm_vg *vg;
struct grub_lvm_lv *lv = NULL; struct grub_lvm_lv *lv = NULL;
for (vg = vgs; vg; vg = vg->next) for (vg = vg_list; vg; vg = vg->next)
{ {
for (lv = vgs->lvs; lv; lv = lv->next) for (lv = vg->lvs; lv; lv = lv->next)
if (! grub_strcmp (lv->name, name)) if (! grub_strcmp (lv->name, name))
break; break;
@ -291,7 +291,7 @@ grub_lvm_scan_device (const char *name)
grub_memcpy (vg_id, p, GRUB_LVM_ID_STRLEN); grub_memcpy (vg_id, p, GRUB_LVM_ID_STRLEN);
vg_id[GRUB_LVM_ID_STRLEN] = '\0'; vg_id[GRUB_LVM_ID_STRLEN] = '\0';
for (vg = vgs; vg; vg = vg->next) for (vg = vg_list; vg; vg = vg->next)
{ {
if (! grub_memcmp(vg_id, vg->id, GRUB_LVM_ID_STRLEN)) if (! grub_memcmp(vg_id, vg->id, GRUB_LVM_ID_STRLEN))
break; break;
@ -314,8 +314,8 @@ grub_lvm_scan_device (const char *name)
vg->lvs = NULL; vg->lvs = NULL;
vg->pvs = NULL; vg->pvs = NULL;
vg->next = vgs; vg->next = vg_list;
vgs = vg; vg_list = vg;
p = grub_strstr (p, "physical_volumes {") p = grub_strstr (p, "physical_volumes {")
+ sizeof ("physical_volumes {") - 1; + sizeof ("physical_volumes {") - 1;