a plugin system to manage boot loader menus More...
Go to the source code of this file.
Data Structures | |
struct | menu_t |
Hooks to call boot loader menu plugins. More... | |
Typedefs | |
typedef int(* | menu_install_f )(lickdir_t *lick) |
typedef int(* | menu_uninstall_f )(lickdir_t *lick) |
typedef int(* | menu_fix_f )(lickdir_t *lick) |
typedef int(* | menu_check_fix_f )(lickdir_t *lick) |
typedef char *(* | menu_gen_section_f )(distro_info_t *info) |
typedef int(* | menu_append_section_f )(const char *id, const char *section, lickdir_t *lick) |
typedef int(* | menu_remove_section_f )(const char *id, lickdir_t *lick) |
Functions | |
menu_t * | new_menu (menu_install_f i, menu_uninstall_f u, menu_fix_f f, menu_check_fix_f c, menu_gen_section_f g, menu_append_section_f a, menu_remove_section_f r) |
create a new menu More... | |
void | free_menu (menu_t *m) |
frees a menu_t and all data associated with it More... | |
int | install_menu (node_t *files, const char *dst, distro_t *distro, const char *id, const char *name, lickdir_t *lick, menu_t *menu) |
add an entry to a menu file More... | |
int | uninstall_menu (const char *id, lickdir_t *lick, menu_t *menu) |
a plugin system to manage boot loader menus
Each boot loader has an associated menu structure. There are three parts to the menu system: 1) the distro-specific generator 2) the menu-specific generator 3) the menu-type writer
The distro-specific generator is given a list of files extracted from the given ISO, and returns what file is the kernel, the initrd, boot options, and more. The menu-specific generator is given this information and creates an entry for it's menu. Finally, this is passed to the menu-type writer, which places this entry into the menu, and removes it on uninstall.
For example, the Puppy Linux generator is given files, and will return the .../vmlinuz, .../initrd.gz and "psubdir=... pfix=..." as the kernel, initrd and boot options, respectively. This is passed to the grub4dos generator, which creates a section containing:
This is then passed to the flat-menu writer, which will place it after the other entries in menu.lst.
void free_menu | ( | menu_t * | m | ) |
frees a menu_t and all data associated with it
m | the menu to free |
int install_menu | ( | node_t * | files, |
const char * | dst, | ||
distro_t * | distro, | ||
const char * | id, | ||
const char * | name, | ||
lickdir_t * | lick, | ||
menu_t * | menu | ||
) |
add an entry to a menu file
files | a list of files extracted from the ISO |
dst | the destination folder |
distro | handles to functions for the distribution |
id | the ID of the installation |
name | the human-friendly name of the installation |
lick | the LICK directory |
menu | the menu being used |