All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/xl: Add 'xen_version' to `xl info`
@ 2013-07-10 16:46 Andrew Cooper
  2013-07-10 17:07 ` Matt Wilson
  2013-07-11  9:02 ` [PATCH] tools/xl: Add 'xen_version' to `xl info` George Dunlap
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Cooper @ 2013-07-10 16:46 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell

Getting the full Xen version in an easily scriptable way is awkward,
especially if trying to piece together from xen_{major,minor,extra}.

This reflects $(XEN_FULLVERSION) in the build system (but under a more
sensible name, as $(XEN_VERSION) is just the major number).

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 tools/libxl/xl_cmdimpl.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 8a478ba..d365f90 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -4582,6 +4582,8 @@ static void output_xeninfo(void)
     printf("xen_major              : %d\n", info->xen_version_major);
     printf("xen_minor              : %d\n", info->xen_version_minor);
     printf("xen_extra              : %s\n", info->xen_version_extra);
+    printf("xen_version            : %d.%d%s\n", info->xen_version_major,
+           info->xen_version_minor, info->xen_version_extra);
     printf("xen_caps               : %s\n", info->capabilities);
     printf("xen_scheduler          : %s\n", libxl_scheduler_to_string(sched));
     printf("xen_pagesize           : %u\n", info->pagesize);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-10 16:46 [PATCH] tools/xl: Add 'xen_version' to `xl info` Andrew Cooper
@ 2013-07-10 17:07 ` Matt Wilson
  2013-07-12 16:40   ` [PATCH] tools/xl: Add 'xen_version' to `xl info` [and 3 more messages] Ian Jackson
  2013-07-11  9:02 ` [PATCH] tools/xl: Add 'xen_version' to `xl info` George Dunlap
  1 sibling, 1 reply; 8+ messages in thread
From: Matt Wilson @ 2013-07-10 17:07 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Ian Campbell, Xen-devel

On Wed, Jul 10, 2013 at 05:46:30PM +0100, Andrew Cooper wrote:
> Getting the full Xen version in an easily scriptable way is awkward,
> especially if trying to piece together from xen_{major,minor,extra}.
> 
> This reflects $(XEN_FULLVERSION) in the build system (but under a more
> sensible name, as $(XEN_VERSION) is just the major number).
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Matt Wilson <msw@amazon.com>

> ---
>  tools/libxl/xl_cmdimpl.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 8a478ba..d365f90 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -4582,6 +4582,8 @@ static void output_xeninfo(void)
>      printf("xen_major              : %d\n", info->xen_version_major);
>      printf("xen_minor              : %d\n", info->xen_version_minor);
>      printf("xen_extra              : %s\n", info->xen_version_extra);
> +    printf("xen_version            : %d.%d%s\n", info->xen_version_major,
> +           info->xen_version_minor, info->xen_version_extra);
>      printf("xen_caps               : %s\n", info->capabilities);
>      printf("xen_scheduler          : %s\n", libxl_scheduler_to_string(sched));
>      printf("xen_pagesize           : %u\n", info->pagesize);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-10 16:46 [PATCH] tools/xl: Add 'xen_version' to `xl info` Andrew Cooper
  2013-07-10 17:07 ` Matt Wilson
@ 2013-07-11  9:02 ` George Dunlap
  2013-07-11  9:10   ` Andrew Cooper
  1 sibling, 1 reply; 8+ messages in thread
From: George Dunlap @ 2013-07-11  9:02 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Ian Campbell, Xen-devel

On Wed, Jul 10, 2013 at 5:46 PM, Andrew Cooper
<andrew.cooper3@citrix.com> wrote:
> Getting the full Xen version in an easily scriptable way is awkward,
> especially if trying to piece together from xen_{major,minor,extra}.
>
> This reflects $(XEN_FULLVERSION) in the build system (but under a more
> sensible name, as $(XEN_VERSION) is just the major number).
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

I can see the point, but it seems a bit redundant to have the version
info printed twice.

This makes me wonder if it might make sense to have options to print
just individual items; e.g.:

xl info --xen_version

or perhaps

xi info --format="%{xen_version}"

or something.

-George

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-11  9:02 ` [PATCH] tools/xl: Add 'xen_version' to `xl info` George Dunlap
@ 2013-07-11  9:10   ` Andrew Cooper
  2013-07-11  9:21     ` George Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Cooper @ 2013-07-11  9:10 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Ian Campbell, Xen-devel

On 11/07/13 10:02, George Dunlap wrote:
> On Wed, Jul 10, 2013 at 5:46 PM, Andrew Cooper
> <andrew.cooper3@citrix.com> wrote:
>> Getting the full Xen version in an easily scriptable way is awkward,
>> especially if trying to piece together from xen_{major,minor,extra}.
>>
>> This reflects $(XEN_FULLVERSION) in the build system (but under a more
>> sensible name, as $(XEN_VERSION) is just the major number).
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> I can see the point, but it seems a bit redundant to have the version
> info printed twice.
>
> This makes me wonder if it might make sense to have options to print
> just individual items; e.g.:
>
> xl info --xen_version
>
> or perhaps
>
> xi info --format="%{xen_version}"
>
> or something.
>
> -George

Ah - that was part 2 which I am working on in my copious free time.

At the moment, xl info takes no parameters, or an -h or -n.

I was thinking it could be modifed to optionally take a positional
paramater, such as

xl info xen_version

Even with this however, my original point still stands.  Getting the
version number is awkward.

~Andrew

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-11  9:10   ` Andrew Cooper
@ 2013-07-11  9:21     ` George Dunlap
  2013-07-11  9:34       ` Andrew Cooper
  2013-07-11 17:49       ` Matt Wilson
  0 siblings, 2 replies; 8+ messages in thread
From: George Dunlap @ 2013-07-11  9:21 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Ian Campbell, Xen-devel

On 11/07/13 10:10, Andrew Cooper wrote:
> On 11/07/13 10:02, George Dunlap wrote:
>> On Wed, Jul 10, 2013 at 5:46 PM, Andrew Cooper
>> <andrew.cooper3@citrix.com> wrote:
>>> Getting the full Xen version in an easily scriptable way is awkward,
>>> especially if trying to piece together from xen_{major,minor,extra}.
>>>
>>> This reflects $(XEN_FULLVERSION) in the build system (but under a more
>>> sensible name, as $(XEN_VERSION) is just the major number).
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> I can see the point, but it seems a bit redundant to have the version
>> info printed twice.
>>
>> This makes me wonder if it might make sense to have options to print
>> just individual items; e.g.:
>>
>> xl info --xen_version
>>
>> or perhaps
>>
>> xi info --format="%{xen_version}"
>>
>> or something.
>>
>> -George
> Ah - that was part 2 which I am working on in my copious free time.
>
> At the moment, xl info takes no parameters, or an -h or -n.
>
> I was thinking it could be modifed to optionally take a positional
> paramater, such as
>
> xl info xen_version
>
> Even with this however, my original point still stands.  Getting the
> version number is awkward.

Is there actually a reason to print it separately at all?  Why not 
replace the individual lines with the unified line?

  -George

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-11  9:21     ` George Dunlap
@ 2013-07-11  9:34       ` Andrew Cooper
  2013-07-11 17:49       ` Matt Wilson
  1 sibling, 0 replies; 8+ messages in thread
From: Andrew Cooper @ 2013-07-11  9:34 UTC (permalink / raw)
  To: George Dunlap; +Cc: Ian Jackson, Ian Campbell, Xen-devel

On 11/07/13 10:21, George Dunlap wrote:
> On 11/07/13 10:10, Andrew Cooper wrote:
>> On 11/07/13 10:02, George Dunlap wrote:
>>> On Wed, Jul 10, 2013 at 5:46 PM, Andrew Cooper
>>> <andrew.cooper3@citrix.com> wrote:
>>>> Getting the full Xen version in an easily scriptable way is awkward,
>>>> especially if trying to piece together from xen_{major,minor,extra}.
>>>>
>>>> This reflects $(XEN_FULLVERSION) in the build system (but under a more
>>>> sensible name, as $(XEN_VERSION) is just the major number).
>>>>
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> I can see the point, but it seems a bit redundant to have the version
>>> info printed twice.
>>>
>>> This makes me wonder if it might make sense to have options to print
>>> just individual items; e.g.:
>>>
>>> xl info --xen_version
>>>
>>> or perhaps
>>>
>>> xi info --format="%{xen_version}"
>>>
>>> or something.
>>>
>>> -George
>> Ah - that was part 2 which I am working on in my copious free time.
>>
>> At the moment, xl info takes no parameters, or an -h or -n.
>>
>> I was thinking it could be modifed to optionally take a positional
>> paramater, such as
>>
>> xl info xen_version
>>
>> Even with this however, my original point still stands.  Getting the
>> version number is awkward.
>
> Is there actually a reason to print it separately at all?  Why not
> replace the individual lines with the unified line?
>
>  -George
>

So as not to break anyone currently relying on `xl info | grep
^xen_major | cut -d ':' -f 2` and friend

~Andrew

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info`
  2013-07-11  9:21     ` George Dunlap
  2013-07-11  9:34       ` Andrew Cooper
@ 2013-07-11 17:49       ` Matt Wilson
  1 sibling, 0 replies; 8+ messages in thread
From: Matt Wilson @ 2013-07-11 17:49 UTC (permalink / raw)
  To: George Dunlap; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Xen-devel

On Thu, Jul 11, 2013 at 10:21:24AM +0100, George Dunlap wrote:
> On 11/07/13 10:10, Andrew Cooper wrote:

[...]

> >
> >Even with this however, my original point still stands.  Getting the
> >version number is awkward.
> 
> Is there actually a reason to print it separately at all?  Why not
> replace the individual lines with the unified line?

Please don't do that. I'm sure that there are scripts out there that
stitch together the parts into a version string. They'll break if we
remove the parts.

--msw

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tools/xl: Add 'xen_version' to `xl info` [and 3 more messages]
  2013-07-10 17:07 ` Matt Wilson
@ 2013-07-12 16:40   ` Ian Jackson
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Jackson @ 2013-07-12 16:40 UTC (permalink / raw)
  To: George Dunlap, Matt Wilson, Andrew Cooper; +Cc: Ian Campbell, Xen-devel

Andrew Cooper writes ("[PATCH] tools/xl: Add 'xen_version' to `xl info`"):
> Getting the full Xen version in an easily scriptable way is awkward,
> especially if trying to piece together from xen_{major,minor,extra}.
> 
> This reflects $(XEN_FULLVERSION) in the build system (but under a more
> sensible name, as $(XEN_VERSION) is just the major number).

Applied, thanks.

Matt Wilson writes ("Re: [Xen-devel] [PATCH] tools/xl: Add 'xen_version' to `xl info`"):
> On Thu, Jul 11, 2013 at 10:21:24AM +0100, George Dunlap wrote:
> > Is there actually a reason to print it separately at all?  Why not
> > replace the individual lines with the unified line?
> 
> Please don't do that. I'm sure that there are scripts out there that
> stitch together the parts into a version string. They'll break if we
> remove the parts.

Quite.

Thanks,
Ian.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-12 16:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-10 16:46 [PATCH] tools/xl: Add 'xen_version' to `xl info` Andrew Cooper
2013-07-10 17:07 ` Matt Wilson
2013-07-12 16:40   ` [PATCH] tools/xl: Add 'xen_version' to `xl info` [and 3 more messages] Ian Jackson
2013-07-11  9:02 ` [PATCH] tools/xl: Add 'xen_version' to `xl info` George Dunlap
2013-07-11  9:10   ` Andrew Cooper
2013-07-11  9:21     ` George Dunlap
2013-07-11  9:34       ` Andrew Cooper
2013-07-11 17:49       ` Matt Wilson

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.