From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Jay Bhukhanwala <jaybhukhanwala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Iterator break-free ?
Date: Fri, 12 Sep 2014 15:56:50 +1000 [thread overview]
Message-ID: <20140912055650.GB13855@voom.redhat.com> (raw)
In-Reply-To: <CAB8QsTBF5V8JJeEkkUXN30fnUoDxVWR_ufGkXaEHRGeZCc6ozw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 783 bytes --]
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 #2: Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2014-09-12 5:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 5:21 Iterator break-free ? Jay Bhukhanwala
[not found] ` <CAB8QsTBF5V8JJeEkkUXN30fnUoDxVWR_ufGkXaEHRGeZCc6ozw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-09-12 5:56 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140912055650.GB13855@voom.redhat.com \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jaybhukhanwala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).