* 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>
+
+ 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.
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)
GRUB_MOD_INIT (ldm)
{
- grub_diskfilter_register (&grub_ldm_dev);
+ grub_diskfilter_register_back (&grub_ldm_dev);
}
GRUB_MOD_FINI (ldm)
GRUB_MOD_INIT (lvm)
{
- grub_diskfilter_register (&grub_lvm_dev);
+ grub_diskfilter_register_back (&grub_lvm_dev);
}
GRUB_MOD_FINI (lvm)
GRUB_MOD_INIT (mdraid1x)
{
- grub_diskfilter_register (&grub_mdraid_dev);
+ grub_diskfilter_register_front (&grub_mdraid_dev);
}
GRUB_MOD_FINI (mdraid1x)
GRUB_MOD_INIT (mdraid09)
#endif
{
- grub_diskfilter_register (&grub_mdraid_dev);
+ grub_diskfilter_register_front (&grub_mdraid_dev);
}
#ifdef MODE_BIGENDIAN
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)
{