* disk/lvm.c (grub_lvm_memberlist): Issue an error if pv->disk = 0.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-17 18:58:56 +02:00
parent ebfe7eb4dd
commit 0973daeb38
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2010-04-17 Vladimir Serbinenko <phcoder@gmail.com>
* disk/lvm.c (grub_lvm_memberlist): Issue an error if pv->disk = 0.
2010-04-17 Christian Franke <franke@computer.org>
* Makefile.in: Add missing localedir setting.

View File

@ -24,6 +24,10 @@
#include <grub/misc.h>
#include <grub/lvm.h>
#ifdef GRUB_UTIL
#include <grub/util/misc.h>
#endif
static struct grub_lvm_vg *vg_list;
static int lv_count;
@ -68,6 +72,9 @@ grub_lvm_memberlist (grub_disk_t disk)
if (lv->vg->pvs)
for (pv = lv->vg->pvs; pv; pv = pv->next)
{
if (!pv->disk)
grub_util_error ("Couldn't find PV %s. Check your device.map",
pv->name);
tmp = grub_malloc (sizeof (*tmp));
tmp->disk = pv->disk;
tmp->next = list;