fix order of OEMparameters to enable BIOS SOL on newer AMT generations
[amt] / parseconfig.h
CommitLineData
402f63cd
MG
1/* config options */
2struct cfg_option {
3 char *domain;
4 char *section;
5 char *entry;
6};
7struct cfg_cmdline {
8 char letter;
9 char *cmdline;
10 struct cfg_option option;
11 char *value;
12 char *desc;
13 int needsarg:1;
14 int yesno:1;
15};
16void cfg_parse_cmdline(int *argc, char **argv, struct cfg_cmdline *opt);
17void cfg_help_cmdline(FILE *fp, struct cfg_cmdline *opt, int w1, int w2, int w3);
18
19/* file I/O */
20int cfg_parse_file(char *dname, char *filename);
21int cfg_write_file(char *dname, char *filename);
22
23/* update */
24void cfg_set_str(char *dname, char *sname, char *ename,
25 const char *value);
26void cfg_set_int(char *dname, char *sname, char *ename, int value);
27void cfg_set_bool(char *dname, char *sname, char *ename, int value);
28
29void cfg_del_section(char *dname, char *sname);
30void cfg_del_entry(char *dname, char *sname, char *ename);
31
32/* search */
33char* cfg_sections_first(char *dname);
34char* cfg_sections_next(char *dname, char *current);
35char* cfg_sections_prev(char *dname, char *current);
36char* cfg_sections_index(char *dname, int i);
37unsigned int cfg_sections_count(char *dname);
38
39char* cfg_entries_first(char *dname, char *sname);
40char* cfg_entries_next(char *dname, char *sname, char *current);
41char* cfg_entries_prev(char *dname, char *sname, char *current);
42char* cfg_entries_index(char *dname, char *sname, int i);
43unsigned int cfg_entries_count(char *dname, char *sname);
44
45#define cfg_sections_for_each(dname, item) \
46 for (item = cfg_sections_first(dname); NULL != item; \
47 item = cfg_sections_next(dname,item))
48
49char* cfg_search(char *dname, char *sname, char *ename, char *value);
50
51/* read */
52char* cfg_get_str(char *dname, char *sname, char *ename);
53unsigned int cfg_get_int(char *dname, char *sname,
54 char *ename, unsigned int def);
55signed int cfg_get_signed_int(char *dname, char *sname,
56 char *ename, signed int def);
57float cfg_get_float(char *dname, char *sname, char *ename, float def);
58int cfg_get_bool(char *dname, char *sname, char *ename, int def);
59
60unsigned int cfg_get_sflags(char *dname, char *sname);
61unsigned int cfg_get_eflags(char *dname, char *sname, char *ename);
62unsigned int cfg_set_sflags(char *dname, char *sname,
63 unsigned int mask, unsigned int bits);
64unsigned int cfg_set_eflags(char *dname, char *sname, char *ename,
65 unsigned int mask, unsigned int bits);
Impressum, Datenschutz