public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] RFA & Update: Using libfdt in u-boot for fdt	command
Date: Fri, 02 Mar 2007 13:38:24 -0500	[thread overview]
Message-ID: <45E86F20.8000402@smiths-aerospace.com> (raw)
In-Reply-To: <20070302053640.GJ1687@localhost.localdomain>

David Gibson wrote:
> On Fri, Mar 02, 2007 at 12:25:17AM -0500, Jerry Van Baren wrote:
>> David Gibson wrote:
>>> On Thu, Mar 01, 2007 at 11:08:38PM -0500, Jerry Van Baren wrote:
>> [snip]
>>
>>>> to give me a pointer to the node name for node tags and property name 
>>>> for property tags.  Now that I have it working, it would be trivial to 
>>>> change the calls to _fdt_next_tag() to instead call fdt_next_tag() 
>>>> passing NULL for the new fourth parameter **namep. ;-)
>>>>
>>>> The reason I need it, I'm printing an unknown tree by stepping through 
>>>> the tree discovering the node and property names.  I need to have 
>>>> fdt_next_tag() return the *name* of the node/property as well as the tag 
>>>> so that I can print and indent for nodes or look up the property value 
>>>> and print the name=value combination.
>>> Hrm.  And it returns NULL for tags without a name?
>> I was unable to generate a tag without a name using dtc (other than the 
>> root node).  It should/would return null, which would be a problem. :-/
> 
> I was thinking more of tag types which don't have a name, to wit,
> FDT_END_NODE and FDT_NOP.

fdt_next_tag() returns the tag, so it returns FDT_END_NODE or FDT_NOP 
and, presumably, the caller would know there is no name associated with 
those tags.  Setting the name pointer *namep to NULL would be good 
paranoia, however.

Best regards,
gvb

      parent reply	other threads:[~2007-03-02 18:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01 14:01 [U-Boot-Users] RFA & Update: Using libfdt in u-boot for fdt command Jerry Van Baren
2007-03-01 23:49 ` Mark A. Greer
2007-03-02  1:17   ` Jerry Van Baren
2007-03-02 20:53     ` Mark A. Greer
2007-03-02  1:55 ` David Gibson
2007-03-02  4:08   ` Jerry Van Baren
2007-03-02  4:48     ` David Gibson
2007-03-02  5:25       ` Jerry Van Baren
2007-03-02  5:36         ` David Gibson
2007-03-02 12:31           ` Jerry Van Baren
2007-03-02 18:35             ` Jerry Van Baren
2007-03-02 22:31               ` David Gibson
2007-03-02 18:38           ` Jerry Van Baren [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=45E86F20.8000402@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace.com \
    --cc=u-boot@lists.denx.de \
    /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