mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
dtc: Make -I dtb mode use fill_fullpaths()
At present -I dts and -I fs modes both use the fill_fullpaths() helper function to fill in the fullpath and basenamelen fields of struct node, which are useful in later parts of the code. -I dtb mode, however, fills these in itself. This patch simplifies flattree.c by making -I dtb mode use fill_fullpaths() like the others. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
5ac97df149
commit
b2de518b80
5 changed files with 18 additions and 45 deletions
3
dtc.c
3
dtc.c
|
@ -55,7 +55,7 @@ char *join_path(const char *path, const char *name)
|
|||
return str;
|
||||
}
|
||||
|
||||
void fill_fullpaths(struct node *tree, const char *prefix)
|
||||
static void fill_fullpaths(struct node *tree, const char *prefix)
|
||||
{
|
||||
struct node *child;
|
||||
const char *unit;
|
||||
|
@ -208,6 +208,7 @@ int main(int argc, char *argv[])
|
|||
if (! bi || ! bi->dt || bi->error)
|
||||
die("Couldn't read input tree\n");
|
||||
|
||||
fill_fullpaths(bi->dt, "");
|
||||
process_checks(force, bi);
|
||||
|
||||
if (streq(outname, "-")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue