[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] Fixed bug in ofd find by property
Signed-off-by: Maria Butrico <butrico@xxxxxxxxxxxxxx> summary: Fixed bug in ofd find by property. Bug was that find by property established a partial next/prev list, with only one element, so that use of this function in ofd fixup code could not fixup all the nodes that needed to be fixed. diff -r 76805cb82965 xen/arch/ppc/of-devtree.c --- a/xen/arch/ppc/of-devtree.c Wed Mar 15 13:19:41 2006 -0600 +++ b/xen/arch/ppc/of-devtree.c Mon Mar 20 14:56:50 2006 -0500 @@ -865,7 +865,7 @@ static ofdn_t ofd_find_by_prop( static ofdn_t ofd_find_by_prop( struct ofd_mem *m, ofdn_t head, - ofdn_t prev, + ofdn_t *prev_p, ofdn_t n, const char *name, const void *val, @@ -893,22 +893,22 @@ retry: } } if ( match == 1 ) { - if ( prev >= 0 ) { - np = ofd_node_get(m, prev); + if ( *prev_p >= 0 ) { + np = ofd_node_get(m, *prev_p); np->on_next = n; } else { head = n; } np = ofd_node_get(m, n); - np->on_prev = prev; + np->on_prev = *prev_p; np->on_next = -1; - prev = n; + *prev_p = n; } } p = ofd_node_child(m, n); if ( p > 0 ) { - head = ofd_find_by_prop(m, head, prev, p, name, val, sz); + head = ofd_find_by_prop(m, head, prev_p, p, name, val, sz); } p = ofd_node_peer(m, n); @@ -933,7 +933,8 @@ ofdn_t ofd_node_find_by_prop( n = OFD_ROOT; } - return ofd_find_by_prop(m, -1, -1, n, name, val, sz); + ofdn_t prev = -1; + return ofd_find_by_prop(m, -1, &prev, n, name, val, sz); } ofdn_t ofd_node_find_next(void *mem, ofdn_t n) _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |