2020-01-22 09:13:19 +03:00
|
|
|
#ifndef __LIB__CONFIG_H__
|
|
|
|
#define __LIB__CONFIG_H__
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2020-10-17 06:37:39 +03:00
|
|
|
#include <stdbool.h>
|
2020-11-02 12:17:20 +03:00
|
|
|
#include <lib/part.h>
|
2020-01-22 09:13:19 +03:00
|
|
|
|
2020-10-20 03:38:44 +03:00
|
|
|
extern bool config_ready;
|
|
|
|
|
2020-11-17 01:31:03 +03:00
|
|
|
struct menu_entry {
|
|
|
|
char name[64];
|
|
|
|
struct menu_entry *parent;
|
|
|
|
struct menu_entry *sub;
|
|
|
|
bool expanded;
|
|
|
|
char *body;
|
|
|
|
struct menu_entry *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct menu_entry *menu_tree;
|
|
|
|
|
2021-02-06 16:40:55 +03:00
|
|
|
int init_config_disk(struct volume *part);
|
2020-11-05 03:37:45 +03:00
|
|
|
int init_config_pxe(void);
|
|
|
|
int init_config(size_t config_size);
|
2020-11-17 01:31:03 +03:00
|
|
|
bool config_get_entry_name(char *ret, size_t index, size_t limit);
|
|
|
|
char *config_get_entry(size_t *size, size_t index);
|
2020-11-27 21:33:34 +03:00
|
|
|
char *config_get_value(const char *config, size_t index, const char *key);
|
2020-01-22 09:13:19 +03:00
|
|
|
|
|
|
|
#endif
|