LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
Data Structures | Typedefs | Enumerations | Functions
distro.h File Reference

Picks the kernel, initrd and options for a given distro. More...

#include "llist.h"
Include dependency graph for distro.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  distro_info_t
 Information taken from a list of files. More...
 
struct  distro_t
 Information about a distribution. More...
 

Typedefs

typedef node_t *(* distro_info_f )(node_t *files, const char *dst, const char *name)
 
typedef int(* distro_filter_f )(const char *f)
 

Enumerations

enum  distro_e { DISTRO_PUPPY = 1, DISTRO_FATDOG = 2 }
 Distribuion IDs.
 

Functions

node_tget_all_distros ()
 Get all distributions. More...
 
distro_tget_distro (distro_e distro)
 Get a distro_t from its numberic id. More...
 
distro_tget_distro_by_key (const char *key)
 Get a distro_t from its string identifier. More...
 
void free_distro (distro_t *d)
 Free a distro_t and all resources associated with it.
 
void free_distro_list (node_t *n)
 Free all distro_t in a list.
 
void free_distro_info (distro_info_t *d)
 Free a distro_info_t and all resources associated with it.
 
void free_distro_info_list (node_t *n)
 Free all distro_info_t in a list.
 
char * menu_path (char *path)
 converts path to a grub-friendly path More...
 

Detailed Description

Picks the kernel, initrd and options for a given distro.

Function Documentation

node_t* get_all_distros ( )

Get all distributions.

Returns
a list of distro_t
distro_t* get_distro ( distro_e  distro)

Get a distro_t from its numberic id.

Returns
the corresponding distro_t if found, or NULL
distro_t* get_distro_by_key ( const char *  key)

Get a distro_t from its string identifier.

Returns
the corresponding distro_t if found, or NULL
char* menu_path ( char *  path)

converts path to a grub-friendly path

Parameters
pathThe path to convert. This parameter is mutated
Returns
A pointer to the mutated path