Commit b72d44a1 authored by Vladimir 'phcoder' Serbinenko's avatar Vladimir 'phcoder' Serbinenko
Browse files

Scan mdraid before LVM.

	* include/grub/diskfilter.h (grub_diskfilter_register): Renamed to ..
	(grub_diskfilter_register_front): ... this.
	(grub_diskfilter_register_back): New function.
	All users of grub_diskfilter_register updated.
parent 33d918b8
2012-04-18 Vladimir Serbinenko <phcoder@gmail.com>
Scan mdraid before LVM.
* include/grub/diskfilter.h (grub_diskfilter_register): Renamed to ..
(grub_diskfilter_register_front): ... this.
(grub_diskfilter_register_back): New function.
All users of grub_diskfilter_register updated.
2012-04-18 Vladimir Serbinenko <phcoder@gmail.com>
 
* util/grub-install.in: Fix an automatic target detection bug.
......@@ -177,7 +177,7 @@ static struct grub_diskfilter grub_dmraid_nv_dev =
GRUB_MOD_INIT(dm_nv)
{
grub_diskfilter_register (&grub_dmraid_nv_dev);
grub_diskfilter_register_front (&grub_dmraid_nv_dev);
}
GRUB_MOD_FINI(dm_nv)
......
......@@ -1001,7 +1001,7 @@ static struct grub_diskfilter grub_ldm_dev = {
GRUB_MOD_INIT (ldm)
{
grub_diskfilter_register (&grub_ldm_dev);
grub_diskfilter_register_back (&grub_ldm_dev);
}
GRUB_MOD_FINI (ldm)
......
......@@ -756,7 +756,7 @@ static struct grub_diskfilter grub_lvm_dev = {
GRUB_MOD_INIT (lvm)
{
grub_diskfilter_register (&grub_lvm_dev);
grub_diskfilter_register_back (&grub_lvm_dev);
}
GRUB_MOD_FINI (lvm)
......
......@@ -224,7 +224,7 @@ static struct grub_diskfilter grub_mdraid_dev = {
GRUB_MOD_INIT (mdraid1x)
{
grub_diskfilter_register (&grub_mdraid_dev);
grub_diskfilter_register_front (&grub_mdraid_dev);
}
GRUB_MOD_FINI (mdraid1x)
......
......@@ -274,7 +274,7 @@ GRUB_MOD_INIT (mdraid09_be)
GRUB_MOD_INIT (mdraid09)
#endif
{
grub_diskfilter_register (&grub_mdraid_dev);
grub_diskfilter_register_front (&grub_mdraid_dev);
}
#ifdef MODE_BIGENDIAN
......
......@@ -148,11 +148,21 @@ typedef struct grub_diskfilter *grub_diskfilter_t;
extern grub_diskfilter_t grub_diskfilter_list;
static inline void
grub_diskfilter_register (grub_diskfilter_t diskfilter)
grub_diskfilter_register_front (grub_diskfilter_t diskfilter)
{
grub_list_push (GRUB_AS_LIST_P (&grub_diskfilter_list),
GRUB_AS_LIST (diskfilter));
}
static inline void
grub_diskfilter_register_back (grub_diskfilter_t diskfilter)
{
grub_diskfilter_t p, *q;
for (q = &grub_diskfilter_list, p = *q; p; q = &p->next, p = *q);
diskfilter->next = NULL;
diskfilter->prev = q;
*q = diskfilter;
}
static inline void
grub_diskfilter_unregister (grub_diskfilter_t diskfilter)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment