fix order of OEMparameters to enable BIOS SOL on newer AMT generations
[amt] / parseconfig.h
1 /* config options */
2 struct cfg_option {
3 char *domain;
4 char *section;
5 char *entry;
6 };
7 struct 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 };
16 void cfg_parse_cmdline(int *argc, char **argv, struct cfg_cmdline *opt);
17 void cfg_help_cmdline(FILE *fp, struct cfg_cmdline *opt, int w1, int w2, int w3);
18
19 /* file I/O */
20 int cfg_parse_file(char *dname, char *filename);
21 int cfg_write_file(char *dname, char *filename);
22
23 /* update */
24 void cfg_set_str(char *dname, char *sname, char *ename,
25 const char *value);
26 void cfg_set_int(char *dname, char *sname, char *ename, int value);
27 void cfg_set_bool(char *dname, char *sname, char *ename, int value);
28
29 void cfg_del_section(char *dname, char *sname);
30 void cfg_del_entry(char *dname, char *sname, char *ename);
31
32 /* search */
33 char* cfg_sections_first(char *dname);
34 char* cfg_sections_next(char *dname, char *current);
35 char* cfg_sections_prev(char *dname, char *current);
36 char* cfg_sections_index(char *dname, int i);
37 unsigned int cfg_sections_count(char *dname);
38
39 char* cfg_entries_first(char *dname, char *sname);
40 char* cfg_entries_next(char *dname, char *sname, char *current);
41 char* cfg_entries_prev(char *dname, char *sname, char *current);
42 char* cfg_entries_index(char *dname, char *sname, int i);
43 unsigned 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
49 char* cfg_search(char *dname, char *sname, char *ename, char *value);
50
51 /* read */
52 char* cfg_get_str(char *dname, char *sname, char *ename);
53 unsigned int cfg_get_int(char *dname, char *sname,
54 char *ename, unsigned int def);
55 signed int cfg_get_signed_int(char *dname, char *sname,
56 char *ename, signed int def);
57 float cfg_get_float(char *dname, char *sname, char *ename, float def);
58 int cfg_get_bool(char *dname, char *sname, char *ename, int def);
59
60 unsigned int cfg_get_sflags(char *dname, char *sname);
61 unsigned int cfg_get_eflags(char *dname, char *sname, char *ename);
62 unsigned int cfg_set_sflags(char *dname, char *sname,
63 unsigned int mask, unsigned int bits);
64 unsigned int cfg_set_eflags(char *dname, char *sname, char *ename,
65 unsigned int mask, unsigned int bits);
Impressum, Datenschutz