Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc583411 authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras
Browse files

[POWERPC] bootwrapper: Add ft_find_device_rel().



Add a function to look up a relative, rather than absolute, path name.

Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Acked-by: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 5adeef52
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -654,6 +654,19 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path)
	return ft_get_phandle(cxt, node);
}

void *ft_find_device_rel(struct ft_cxt *cxt, const void *top,
                         const char *srch_path)
{
	char *node;

	node = ft_node_ph2node(cxt, top);
	if (node == NULL)
		return NULL;

	node = ft_find_descendent(cxt, node, srch_path);
	return ft_get_phandle(cxt, node);
}

void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path)
{
	struct ft_atom atom;
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
void ft_dump_blob(const void *bphp);
void ft_merge_blob(struct ft_cxt *cxt, void *blob);
void *ft_find_device(struct ft_cxt *cxt, const char *srch_path);
void *ft_find_device_rel(struct ft_cxt *cxt, const void *top,
                         const char *srch_path);
void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
		void *buf, const unsigned int buflen);