From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: "long.wanglong" <long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
"jdl-CYoMK+44s/E@public.gmane.org"
<jdl-CYoMK+44s/E@public.gmane.org>,
peifeiyue-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
Devicetree Compiler
<devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] fdtput: add delete node and property function
Date: Thu, 15 Jan 2015 16:20:30 +1100 [thread overview]
Message-ID: <20150115052030.GG5297@voom.fritz.box> (raw)
In-Reply-To: <54B73DE6.5030108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2166 bytes --]
On Thu, Jan 15, 2015 at 12:11:18PM +0800, long.wanglong wrote:
> On 2015/1/15 11:08, David Gibson wrote:
> > On Tue, Jan 13, 2015 at 08:07:59PM -0800, Simon Glass wrote:
> >> Hi Wang,
> >>
> >> On 13 January 2015 at 19:53, Wang Long <long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
> >>> add the delete node and property function for fdtput.
> >>>
> >>> usage:
> >>> 1) delete a node
> >>> # fdtput test.dtb -d node /chosen/son
> >>> 2) delete a property
> >>> # fdtput test.dtb -d prop /chosen/ prop_name
> >>
> >> This is a great addition!
> >>
> >> I know David is keen on single character flags. But would it be better
> >> to have a separate delete option, e.g.
> >
> > Well.. it's not that I'm actually keen on them. Just that I haven't
> > thought the bother of another dependency adding a long options library
> > was worth it so far.
> >
> >> -r to remove a node
> >> -d to delete a property
> >
> > I like that suggestion better than "-d node" and "-d prop".
> >
>
> ok.
>
> > But I wonder if it might be even simpler to just base it on the number
> > of arguments so:
> >
> > $ fdtput foo.dtb -d /node@1234 some-property
> >
> > will delete a single property, but
> >
> > $ fdtput foo.dtb -d /node@1234
> >
> > will delete the whole node.
> >
>
> Hi David Gibson,
>
> if we decide to delete node or property based on the number of the arguments.
> we just delete a node or a property at once.
>
> how about the following suggestion:
>
> $ fdtput -r <options> <dt file> [<node>...]
>
> will delete several nodes,
>
> $ fdtput -d <options> <dt file> <node> [<property>...]
>
> will delete several properties in a node.
>
> the `fdtput` can create several nodes at once. so i think that it should to delete
> several nodes at once.
Good point, I forgot that the other options can do multiple operations
in a single command.
Your suggestion sounds good to me.
--
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:[~2015-01-15 5:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 3:53 [PATCH] fdtput: add delete node and property function Wang Long
[not found] ` <1421207637-32690-1-git-send-email-long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-01-14 4:07 ` Simon Glass
[not found] ` <CAPnjgZ32hrN9t3FUDtZzrbjTrq9UdC4wgK6J_Z2XUNWb47cyBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-14 5:25 ` long.wanglong
[not found] ` <54B5FDCC.3050905-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-01-14 14:47 ` Simon Glass
2015-01-15 3:08 ` David Gibson
[not found] ` <20150115030816.GE5297-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2015-01-15 4:11 ` long.wanglong
[not found] ` <54B73DE6.5030108-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-01-15 4:34 ` Simon Glass
2015-01-15 5:20 ` 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=20150115052030.GG5297@voom.fritz.box \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jdl-CYoMK+44s/E@public.gmane.org \
--cc=long.wanglong-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=peifeiyue-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=sjg-F7+t8E8rja9g9hUCZPvPmw@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).