public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 4/4] cmd_part: add partition-related command
Date: Thu, 6 Sep 2012 10:12:35 -0700	[thread overview]
Message-ID: <20120906171235.GA15624@bill-the-cat> (raw)
In-Reply-To: <50480CA2.2040606@wwwdotorg.org>

On Wed, Sep 05, 2012 at 08:38:26PM -0600, Stephen Warren wrote:
> On 09/05/2012 05:51 PM, Rob Herring wrote:
> > On 09/05/2012 05:03 PM, Stephen Warren wrote:
> >> From: Stephen Warren <swarren@nvidia.com>
> >>
> >> This implements the following:
> >>
> >> part uuid mmc 0:1
> >>   -> print partition UUID
> >> part uuid mmc 0:1 uuid
> >>   -> set environment variable to partition UUID
> > 
> > What's the reason to not always both print out and set the uuid env var?
> > 
> > Perhaps the env name should be partuuid or part_uuid as you could have
> > uuid's for other purposes?
> 
> The idea is that if you're running the command interactively, you won't
> pass a variable name on the command-line, so the command will print out
> the UUID for you to read. In this case, it's pointless to set any
> environment variable.
> 
> However, if you're writing a script, you want to capture the UUID into
> an environment variable, and it's quite unlikely you want to litter
> stdout with that content too. Hence, either-or, not both.

Do other commands have a "I'm being scripted, probably, don't stdout"
and "I'm being interactive, use stdout" distinction like this?  IMHO,
always printing out makes sense so you can "see" that your script is
working as you expect.

-- 
Tom

  reply	other threads:[~2012-09-06 17:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 22:03 [U-Boot] [PATCH V2 1/4] disk: part_efi: range-check partition number Stephen Warren
2012-09-05 22:03 ` [U-Boot] [PATCH V2 2/4] disk: part_efi: parse and store partition UUID Stephen Warren
2012-09-05 23:24   ` Tom Rini
2012-09-05 22:03 ` [U-Boot] [PATCH V2 3/4] disk: part_msdos: " Stephen Warren
2012-09-05 22:03 ` [U-Boot] [PATCH V2 4/4] cmd_part: add partition-related command Stephen Warren
2012-09-05 23:51   ` Rob Herring
2012-09-05 23:58     ` Tom Rini
2012-09-07 19:42       ` Stephen Warren
2012-09-11 22:52       ` Stephen Warren
2012-09-12  7:00         ` Lukasz Majewski
2012-09-12 16:48           ` Tom Rini
2012-09-12 16:47         ` Tom Rini
2012-09-06  2:38     ` Stephen Warren
2012-09-06 17:12       ` Tom Rini [this message]
2012-09-06 18:46         ` Stephen Warren
2012-09-06 22:45           ` Tom Rini

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=20120906171235.GA15624@bill-the-cat \
    --to=trini@ti.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