2009-11-12 Felix Zielcke * normal/handler.c (read_handler_list): Use grub_handler_unregister to properly remove the handlers. Skip `rescue' and `console' handlers defined in kernel. === modified file 'normal/handler.c' --- normal/handler.c 2009-11-09 14:55:27 +0000 +++ normal/handler.c 2009-11-12 20:31:00 +0000 @@ -176,14 +176,21 @@ read_handler_list (void) if (file) { char *buf = NULL; - + grub_handler_class_t hcnext, hc = grub_handler_class_list; + grub_handler_t hl; /* Override previous handler.lst. */ - while (grub_handler_class_list) + for (; hc ; hc = hcnext) { - grub_handler_class_t tmp; - tmp = grub_handler_class_list->next; - grub_free (grub_handler_class_list); - grub_handler_class_list = tmp; + hcnext = hc->next; + hl = hc->handler_list; + while (hl) + { + grub_handler_t tmp = hl->next; + if (grub_strcmp (hl->name, "rescue") != 0 + && grub_strcmp (hl->name, "console") != 0) + grub_handler_unregister (hc,hl); + hl = tmp; + } } for (;; grub_free (buf))