diff options
author | John Bonesio <bones@secretlab.ca> | 2010-11-17 18:28:20 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-01-03 18:02:49 -0500 |
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 8fe1bdf239f0..f3774530170a 100644 --- a/scripts/dtc/fstree.c +++ b/scripts/dtc/fstree.c | |||
@@ -58,10 +58,9 @@ static struct node *read_fstree(const char *dirname) | |||
58 | "WARNING: Cannot open %s: %s\n", | 58 | "WARNING: Cannot open %s: %s\n", |
59 | tmpnam, strerror(errno)); | 59 | tmpnam, strerror(errno)); |
60 | } else { | 60 | } else { |
61 | prop = build_property(strdup(de->d_name), | 61 | prop = build_property(xstrdup(de->d_name), |
62 | data_copy_file(pfile, | 62 | data_copy_file(pfile, |
63 | st.st_size), | 63 | st.st_size)); |
64 | NULL); | ||
65 | add_property(tree, prop); | 64 | add_property(tree, prop); |
66 | fclose(pfile); | 65 | fclose(pfile); |
67 | } | 66 | } |
@@ -69,8 +68,7 @@ static struct node *read_fstree(const char *dirname) | |||
69 | struct node *newchild; | 68 | struct node *newchild; |
70 | 69 | ||
71 | newchild = read_fstree(tmpnam); | 70 | newchild = read_fstree(tmpnam); |
72 | newchild = name_node(newchild, strdup(de->d_name), | 71 | newchild = name_node(newchild, xstrdup(de->d_name)); |
73 | NULL); | ||
74 | add_child(tree, newchild); | 72 | add_child(tree, newchild); |
75 | } | 73 | } |
76 | 74 | ||
@@ -86,8 +84,8 @@ struct boot_info *dt_from_fs(const char *dirname) | |||
86 | struct node *tree; | 84 | struct node *tree; |
87 | 85 | ||
88 | tree = read_fstree(dirname); | 86 | tree = read_fstree(dirname); |
89 | tree = name_node(tree, "", NULL); | 87 | tree = name_node(tree, ""); |
90 | 88 | ||
91 | return build_boot_info(NULL, tree, 0); | 89 | return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); |
92 | } | 90 | } |
93 | 91 | ||