Re: Iterator break-free ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, Sep 11, 2014 at 10:21:11PM -0700, Jay Bhukhanwala wrote:
> When traversing the entire tree using fdt_next_node, will the iterator
> break if I change the blob structure, due to, say, addition/deletion
> of a node/property or changing a property ?

In general yes, it will break.

however there's one very common special case where the iteration will
keep working:
   if between one call to fdt_next_node() and the next, the *only*
   insertions or deletions are of nodes or properties within the node
   returned by the first call to fdt_next_node(), then you're ok.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: pgpyxyus3jwl5.pgp
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux