summaryrefslogtreecommitdiffstats
path: root/contrib/dtc/fstree.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dtc/fstree.c')
-rw-r--r--contrib/dtc/fstree.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/dtc/fstree.c b/contrib/dtc/fstree.c
index 7aee982..f377453 100644
--- a/contrib/dtc/fstree.c
+++ b/contrib/dtc/fstree.c
@@ -60,8 +60,7 @@ static struct node *read_fstree(const char *dirname)
} else {
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,14 +68,14 @@ static struct node *read_fstree(const char *dirname)
struct node *newchild;
newchild = read_fstree(tmpnam);
- newchild = name_node(newchild, xstrdup(de->d_name),
- NULL);
+ newchild = name_node(newchild, xstrdup(de->d_name));
add_child(tree, newchild);
}
free(tmpnam);
}
+ closedir(d);
return tree;
}
@@ -85,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));
}
OpenPOWER on IntegriCloud