summaryrefslogtreecommitdiff
path: root/utils/sbtools/dbparser.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/sbtools/dbparser.h')
-rw-r--r--utils/sbtools/dbparser.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/utils/sbtools/dbparser.h b/utils/sbtools/dbparser.h
index f1b7ffd77e..cfb1a692fa 100644
--- a/utils/sbtools/dbparser.h
+++ b/utils/sbtools/dbparser.h
@@ -43,7 +43,11 @@ struct bin_param_t
43struct cmd_source_t 43struct cmd_source_t
44{ 44{
45 char *identifier; 45 char *identifier;
46 bool is_extern;
47 // <union>
48 int extern_nr;
46 char *filename; 49 char *filename;
50 // </union>
47 struct cmd_source_t *next; 51 struct cmd_source_t *next;
48 /* for later use */ 52 /* for later use */
49 enum cmd_source_type_t type; 53 enum cmd_source_type_t type;
@@ -72,23 +76,41 @@ struct cmd_inst_t
72 struct cmd_inst_t *next; 76 struct cmd_inst_t *next;
73}; 77};
74 78
79struct cmd_option_t
80{
81 char *name;
82 bool is_string;
83 /* <union> */
84 uint32_t val;
85 char *str;
86 /* </union> */
87 struct cmd_option_t *next;
88};
89
75struct cmd_section_t 90struct cmd_section_t
76{ 91{
77 uint32_t identifier; 92 uint32_t identifier;
78 struct cmd_inst_t *inst_list; 93 bool is_data;
94 // <union>
95 struct cmd_inst_t *inst_list;
96 char *source_id;
97 // </union>
79 struct cmd_section_t *next; 98 struct cmd_section_t *next;
99 struct cmd_option_t *opt_list;
80}; 100};
81 101
82struct cmd_file_t 102struct cmd_file_t
83{ 103{
84 struct sb_version_t product_ver; 104 struct cmd_option_t *opt_list;
85 struct sb_version_t component_ver; 105 struct cmd_option_t *constant_list; /* constant all always integers */
86 struct cmd_source_t *source_list; 106 struct cmd_source_t *source_list;
87 struct cmd_section_t *section_list; 107 struct cmd_section_t *section_list;
88}; 108};
89 109
90struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id); 110struct cmd_source_t *db_find_source_by_id(struct cmd_file_t *cmd_file, const char *id);
111struct cmd_option_t *db_find_option_by_id(struct cmd_option_t *opt, const char *name);
91bool db_parse_sb_version(struct sb_version_t *ver, char *str); 112bool db_parse_sb_version(struct sb_version_t *ver, char *str);
113void db_generate_default_sb_version(struct sb_version_t *ver);
92struct cmd_file_t *db_parse_file(const char *file); 114struct cmd_file_t *db_parse_file(const char *file);
93 115
94#endif /* __DBPARSER__ */ 116#endif /* __DBPARSER__ */