summaryrefslogtreecommitdiffstats
path: root/contrib/dtc/fstree.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2012-07-24 16:29:33 +0000
committerimp <imp@FreeBSD.org>2012-07-24 16:29:33 +0000
commit271289d4bf786cb542f44a7cc435e7eea1463eec (patch)
tree60be8a4bac3452ea449c82c5dfefde0485cdb631 /contrib/dtc/fstree.c
parentb7a0f04c526af6628c15d9d29f4ea078ad0f4caf (diff)
parent411f4c1084154670913f56f4218e1d7f103cd348 (diff)
downloadFreeBSD-src-271289d4bf786cb542f44a7cc435e7eea1463eec.zip
FreeBSD-src-271289d4bf786cb542f44a7cc435e7eea1463eec.tar.gz
Update to latest git version of dtc to get new dtsv2 support,
including the include directive. Fix minor build issue corrected by converting yypush_buffer_state and yypop_buffer_state to yy_set_buffer_state and a hard-coded 100-deep stack. It was easier to fix it here than to import that support into our flex. The new tools and test hardness remain unsupported at the moment.
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