xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/xl: Allow callers of `xl info` to select specific information
Date: Thu, 7 Jul 2016 12:52:49 +0100	[thread overview]
Message-ID: <20160707115249.GK416@citrix.com> (raw)
In-Reply-To: <1467304823-9328-1-git-send-email-andrew.cooper3@citrix.com>

On Thu, Jun 30, 2016 at 05:40:23PM +0100, Andrew Cooper wrote:
> When scripting, it is much more convenient to use:
> 
>     [root@fusebot ~]# xl info xen_version
>     4.8-unstable
> 
> than to construct some sed/awk/other to parse:
> 
>     [root@fusebot ~]# xl info
>     ...
>     xen_version            : 4.8-unstable
>     ...
> 
> This works by wrapping all printf() calls in main_info() with maybe_printf(),
> which formats its arguments, compares the resulting string to the provided
> restriction, and discards it if no match is found.
> 
> A restriction like this doesn't make sense in combination with --numa, so is
> excluded in that case.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

I only skim the code. It looks reasonable.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      reply	other threads:[~2016-07-07 11:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 16:40 [PATCH] tools/xl: Allow callers of `xl info` to select specific information Andrew Cooper
2016-07-07 11:52 ` Wei Liu [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=20160707115249.GK416@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.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).