mirror of
https://github.com/dgibson/dtc.git
synced 2026-05-12 19:53:02 -04:00
dtc: Implement checks for the format of node and property names
This patch adds checks to the checking framework to verify that node and property names contain only legal characters, and in the case of node names there is at most one '@'. At present when coming from dts input, this is mostly already ensured by the grammer, however putting the check later means its easier to generate helpful error messages rather than just "syntax error". For dtb input, these checks replace the older similar check built into flattree.c. Testcases for the checks are also implemented. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
7c635dcb2f
commit
fa5b520ccb
6 changed files with 97 additions and 23 deletions
|
|
@ -37,6 +37,7 @@ struct {
|
|||
} trees[] = {
|
||||
#define TREE(name) { &_##name, #name ".dtb" }
|
||||
TREE(test_tree1),
|
||||
TREE(bad_node_char), TREE(bad_node_format), TREE(bad_prop_char),
|
||||
};
|
||||
|
||||
#define NUM_TREES (sizeof(trees) / sizeof(trees[0]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue