All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Update on the fdt command
Date: Wed, 21 Mar 2007 11:15:14 -0400	[thread overview]
Message-ID: <46014C02.1050103@smiths-aerospace.com> (raw)
In-Reply-To: <20070321144944.E3C39352636@atlas.denx.de>

Wolfgang Denk wrote:
> Hi,
> 
> in message <46013C58.2040300@smiths-aerospace.com> you wrote:
>> I'm getting close to having a functional "fdt" command.  For a sneak 
>> peek you can look here:
>> <http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=summary>
>>
>> The new fdt command can be found here:
>> <http://www.cideas.us/cgi-bin/gitweb.cgi?p=u-boot/u-boot-mpc83xx;a=blob;f=common/cmd_fdt.c;h=8cce35b137f4214a2c6cbab026460b54d72bb6e0;hb=HEAD>
>> (see line 777 ff. to see the subcommand list).  Please critique my 
>> subcommands - it will hurt my feelings, but I'll get over it.
> 
> Looks fine to me, but I cannot understand this part:
> 
>  786         "fdt rm     <path> <prop>           - Delete <property>\n"
>  787         "fdt rm     <path> <node>           - Delete the node *NOTE THE SPACE*\n"
> 
> NOTE THE SPACE? Which one? And where is the difference?

The space between <path> and <node>... everywhere else, <path> includes 
the last node and a space delimits the <property>.  I propose this to 
make parsing easier: I would not have to find the last "/" to find the 
node that was intended to be deleted.  The alternative is:
"fdt rm     <path> <prop>     - Delete <property>\n"
"fdt rm     <path>            - Delete the last node in <path>\n"

I have not implemented the rm command yet, so I'm flexible.  It also 
means I have not tried it in real life... I wouldn't be surprised if I 
find the extra space between <path> and <node> is so annoying that it is 
worth finding the last '/' (which really isn't that difficult to parse).

The advantage of specifying "<path> <node>" as I see it is that it is 
harder to screw up and delete major parts of the tree inadvertently
   rm /cpus      # poof, all gone!
when you really meant to do
   rm /cpus PowerPC,8560 at 0
Either way, I would not allow the deletion of the root node.  For the 
<path>-only version
   rm /
is valid syntax but would be a problem - would have to test for this as 
a special case.  For the <path> <node>, this becomes invalid syntax and 
would not be permitted.  (Note that, either way, you can delete all the 
subnodes of the root '/' individually.  Deleting the subnodes makes 
sense, deleting the root node itself does not.)

>> My proposal to Wolfgang is that denx.de create a repository for my 
>> changes so I can submit them and ultimately he can pull the changes into 
>> the master repo.  The changes to add David Gibson's libfdt to the source 
> 
> Is the name u-boot-fdt ok? Can you please send me your public SSH key?

u-boot-fdt is great.  I'll send you my key.

> Best regards,
> 
> Wolfgang Denk

Thanks,
gvb

  reply	other threads:[~2007-03-21 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 14:08 [U-Boot-Users] Update on the fdt command Jerry Van Baren
2007-03-21 14:49 ` Wolfgang Denk
2007-03-21 15:15   ` Jerry Van Baren [this message]
2007-03-21 16:41     ` Wolfgang Denk

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=46014C02.1050103@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.