aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/config.h
blob: b96a86607bc41a5976e57eb743488677d3a90259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Channel glob type
 */
enum /*_mm_channel_glob_type */ {
	glob_range,
	glob_list
};

/*
 * Channel specification glob
 */
typedef struct /*_mm_channel_glob*/ {
	size_t offset[2];
	union {
		void* impl;
		uint64_t u64[2];
	} limits;
	uint8_t type;
	uint64_t values;
} channel_glob;

/*
 * (Multi-)Channel specification
 */
typedef struct /*_mm_channel_spec*/ {
	char* spec;
	uint8_t internal;
	size_t channels;
	size_t globs;
	channel_glob* glob;
} channel_spec;

/*
 * Command-line override types
 */
typedef enum {
	override_backend,
	override_instance
} override_type;

/*
 * Command-line override data
 */
typedef struct /*_mm_config_override*/ {
	override_type type;
	uint8_t handled;
	char* target;
	char* option;
	char* value;
} config_override;

int config_read(char* file);
int config_add_override(override_type type, char* data);
void config_free();