Fix LVM listing

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-22 14:58:12 +02:00
parent 4defebbec8
commit 716aa45e40

View file

@ -129,10 +129,7 @@ grub_lvm_iterate (int (*hook) (const char *name),
for (lv = vg->lvs; lv; lv = lv->next) for (lv = vg->lvs; lv; lv = lv->next)
if (lv->visible && lv->number >= old_count) if (lv->visible && lv->number >= old_count)
{ {
char lvname[sizeof ("lvm/") + grub_strlen (lv->name)]; if (hook (lv->fullname))
grub_memcpy (lvname, "lvm/", sizeof ("lvm/") - 1);
grub_strcpy (lvname + sizeof ("lvm/") - 1, lv->name);
if (hook (lvname))
return 1; return 1;
} }
} }