[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] tools/xl: Allow callers of `xl info` to select specific information



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@xxxxxxxxxx>

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

I only skim the code. It looks reasonable.

Wei.

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.