diff options
author | John Bonesio <bones@secretlab.ca> | 2010-11-17 15:28:20 -0800 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-01-03 16:02:49 -0700 |
commit | 658f29a51e9830e620bb9a1ce3534b318a38bfeb (patch) | |
tree | e6cc7cd9b9e17d97308619fd8516b77bcc038114 /scripts/dtc/fstree.c | |
parent | cd1e65044d4473cca9a01bae7b7938f065044a4b (diff) |
of/flattree: Update dtc to current mainline.
Pull in recent changes from the main dtc repository. These changes
primarily allow multiple device trees to be declared which are merged
by dtc. This feature allows us to include a basic dts file and then
provide more information for the specific system through the merging
functionality.
Changes pulled from git://git.jdl.com/software/dtc.git
commit id: 37c0b6a0, "dtc: Add code to make diffing trees easier"
Signed-off-by: John Bonesio <bones@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'scripts/dtc/fstree.c')
-rw-r--r-- | scripts/dtc/fstree.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c index 8fe1bdf239f..f3774530170 100644 --- a/scripts/dtc/fstree.c +++ b/scripts/dtc/fstree.c @@ -58,10 +58,9 @@ static struct node *read_fstree(const char *dirname) "WARNING: Cannot open %s: %s\n", tmpnam, strerror(errno)); } else { - prop = build_property(strdup(de->d_name), + prop = build_property(xstrdup(de->d_name), data_copy_file(pfile, - st.st_size), - NULL); + st.st_size)); add_property(tree, prop); fclose(pfile); } @@ -69,8 +68,7 @@ static struct node *read_fstree(const char *dirname) struct node *newchild; newchild = read_fstree(tmpnam); - newchild = name_node(newchild, strdup(de->d_name), - NULL); + newchild = name_node(newchild, xstrdup(de->d_name)); add_child(tree, newchild); } @@ -86,8 +84,8 @@ struct boot_info *dt_from_fs(const char *dirname) struct node *tree; tree = read_fstree(dirname); - tree = name_node(tree, "", NULL); + tree = name_node(tree, ""); - return build_boot_info(NULL, tree, 0); + return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); } |