summaryrefslogtreecommitdiff
path: root/scripts/dtc/fstree.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/fstree.c')
-rw-r--r--scripts/dtc/fstree.c12
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)
"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));
}