Remove prio_list
This commit is contained in:
parent
78dde88e8c
commit
ead2a8822b
7 changed files with 41 additions and 83 deletions
|
@ -32,39 +32,3 @@ grub_named_list_find (grub_named_list_t head, const char *name)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
grub_prio_list_insert (grub_prio_list_t *head, grub_prio_list_t nitem)
|
||||
{
|
||||
int inactive = 0;
|
||||
|
||||
grub_prio_list_t *p, q;
|
||||
|
||||
for (p = head, q = *p; q; p = &(q->next), q = q->next)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = grub_strcmp (nitem->name, q->name);
|
||||
if (r < 0)
|
||||
break;
|
||||
if (r > 0)
|
||||
continue;
|
||||
|
||||
if (nitem->prio >= (q->prio & GRUB_PRIO_LIST_PRIO_MASK))
|
||||
{
|
||||
q->prio &= ~GRUB_PRIO_LIST_FLAG_ACTIVE;
|
||||
break;
|
||||
}
|
||||
|
||||
inactive = 1;
|
||||
}
|
||||
|
||||
*p = nitem;
|
||||
nitem->next = q;
|
||||
if (q)
|
||||
q->prev = &nitem->next;
|
||||
nitem->prev = p;
|
||||
|
||||
if (! inactive)
|
||||
nitem->prio |= GRUB_PRIO_LIST_FLAG_ACTIVE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue