mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Initial label support. Also switch to glr-parser mode and get rid of
hacks that were necessary without it.
This commit is contained in:
parent
fc14dad769
commit
4102d840d9
10 changed files with 107 additions and 55 deletions
8
fstree.c
8
fstree.c
|
@ -60,7 +60,8 @@ static struct node *read_fstree(char *dirname)
|
|||
} else {
|
||||
prop = build_property(strdup(de->d_name),
|
||||
data_copy_file(pfile,
|
||||
st.st_size));
|
||||
st.st_size),
|
||||
NULL);
|
||||
add_property(tree, prop);
|
||||
fclose(pfile);
|
||||
}
|
||||
|
@ -68,7 +69,8 @@ static struct node *read_fstree(char *dirname)
|
|||
struct node *newchild;
|
||||
|
||||
newchild = read_fstree(tmpnam);
|
||||
newchild = name_node(newchild, strdup(de->d_name));
|
||||
newchild = name_node(newchild, strdup(de->d_name),
|
||||
NULL);
|
||||
add_child(tree, newchild);
|
||||
}
|
||||
|
||||
|
@ -83,7 +85,7 @@ struct node *dt_from_fs(char *dirname)
|
|||
struct node *tree;
|
||||
|
||||
tree = read_fstree(dirname);
|
||||
tree = name_node(tree, "");
|
||||
tree = name_node(tree, "", NULL);
|
||||
|
||||
fill_fullpaths(tree, "");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue