Message ID | 1450444471-6454-3-git-send-email-jgross@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, 2015-12-18 at 14:14 +0100, Juergen Gross wrote: > Support the xenstore domain flag for obtaining domain info. > > Signed-off-by: Juergen Gross <jgross@suse.com> > --- > tools/libxc/include/xenctrl.h | 2 +- > tools/libxc/xc_domain.c | 17 +++++++++-------- > 2 files changed, 10 insertions(+), 9 deletions(-) > > diff --git a/tools/libxc/include/xenctrl.h > b/tools/libxc/include/xenctrl.h > index 01a6dda..45d8ff6 100644 > --- a/tools/libxc/include/xenctrl.h > +++ b/tools/libxc/include/xenctrl.h > @@ -456,7 +456,7 @@ typedef struct xc_dominfo { > uint32_t ssidref; > unsigned int dying:1, crashed:1, shutdown:1, > paused:1, blocked:1, running:1, > - hvm:1, debugged:1, pvh:1; > + hvm:1, debugged:1, pvh:1, xs_domain:1; All the other flags omit the _domain/_guest since it is implicit in the context I think. "xs" would be ok, so would "xenstore" or "xenstored" I think. You might want to consider similar arguments for DOMINF and the create flag, or you might want to argue that this field should be xs_domain for consistency with those. Apart from what colour to paint the shed to code looks trivially correct. Ian.
On 06/01/16 16:52, Ian Campbell wrote: > On Fri, 2015-12-18 at 14:14 +0100, Juergen Gross wrote: >> Support the xenstore domain flag for obtaining domain info. >> >> Signed-off-by: Juergen Gross <jgross@suse.com> >> --- >> tools/libxc/include/xenctrl.h | 2 +- >> tools/libxc/xc_domain.c | 17 +++++++++-------- >> 2 files changed, 10 insertions(+), 9 deletions(-) >> >> diff --git a/tools/libxc/include/xenctrl.h >> b/tools/libxc/include/xenctrl.h >> index 01a6dda..45d8ff6 100644 >> --- a/tools/libxc/include/xenctrl.h >> +++ b/tools/libxc/include/xenctrl.h >> @@ -456,7 +456,7 @@ typedef struct xc_dominfo { >> uint32_t ssidref; >> unsigned int dying:1, crashed:1, shutdown:1, >> paused:1, blocked:1, running:1, >> - hvm:1, debugged:1, pvh:1; >> + hvm:1, debugged:1, pvh:1, xs_domain:1; > > All the other flags omit the _domain/_guest since it is implicit in the > context I think. > > "xs" would be ok, so would "xenstore" or "xenstored" I think. > > You might want to consider similar arguments for DOMINF and the create > flag, or you might want to argue that this field should be xs_domain for > consistency with those. In case there are no objections from others, I'll go with "xenstore". > > Apart from what colour to paint the shed to code looks trivially correct. Can I take this as an "Ack"? Juergen
On Thu, 2016-01-07 at 07:08 +0100, Juergen Gross wrote: > On 06/01/16 16:52, Ian Campbell wrote: > > On Fri, 2015-12-18 at 14:14 +0100, Juergen Gross wrote: > > > Support the xenstore domain flag for obtaining domain info. > > > > > > Signed-off-by: Juergen Gross <jgross@suse.com> > > > --- > > > tools/libxc/include/xenctrl.h | 2 +- > > > tools/libxc/xc_domain.c | 17 +++++++++-------- > > > 2 files changed, 10 insertions(+), 9 deletions(-) > > > > > > diff --git a/tools/libxc/include/xenctrl.h > > > b/tools/libxc/include/xenctrl.h > > > index 01a6dda..45d8ff6 100644 > > > --- a/tools/libxc/include/xenctrl.h > > > +++ b/tools/libxc/include/xenctrl.h > > > @@ -456,7 +456,7 @@ typedef struct xc_dominfo { > > > uint32_t ssidref; > > > unsigned int dying:1, crashed:1, shutdown:1, > > > paused:1, blocked:1, running:1, > > > - hvm:1, debugged:1, pvh:1; > > > + hvm:1, debugged:1, pvh:1, xs_domain:1; > > > > All the other flags omit the _domain/_guest since it is implicit in the > > context I think. > > > > "xs" would be ok, so would "xenstore" or "xenstored" I think. > > > > You might want to consider similar arguments for DOMINF and the create > > flag, or you might want to argue that this field should be xs_domain for > > consistency with those. > > In case there are no objections from others, I'll go with "xenstore". Sounds good to me. > > > > Apart from what colour to paint the shed to code looks trivially > > correct. > > Can I take this as an "Ack"? Acked-by: Ian Campbell <ian.campbell@citrix.com> Ian.
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 01a6dda..45d8ff6 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -456,7 +456,7 @@ typedef struct xc_dominfo { uint32_t ssidref; unsigned int dying:1, crashed:1, shutdown:1, paused:1, blocked:1, running:1, - hvm:1, debugged:1, pvh:1; + hvm:1, debugged:1, pvh:1, xs_domain:1; unsigned int shutdown_reason; /* only meaningful if shutdown==1 */ unsigned long nr_pages; /* current number, not maximum */ unsigned long nr_outstanding_pages; diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 96506d5..46bca92 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -366,14 +366,15 @@ int xc_domain_getinfo(xc_interface *xch, break; info->domid = (uint16_t)domctl.domain; - info->dying = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_dying); - info->shutdown = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_shutdown); - info->paused = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_paused); - info->blocked = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_blocked); - info->running = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_running); - info->hvm = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_hvm_guest); - info->debugged = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_debugged); - info->pvh = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_pvh_guest); + info->dying = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_dying); + info->shutdown = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_shutdown); + info->paused = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_paused); + info->blocked = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_blocked); + info->running = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_running); + info->hvm = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_hvm_guest); + info->debugged = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_debugged); + info->pvh = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_pvh_guest); + info->xs_domain = !!(domctl.u.getdomaininfo.flags&XEN_DOMINF_xs_domain); info->shutdown_reason = (domctl.u.getdomaininfo.flags>>XEN_DOMINF_shutdownshift) &
Support the xenstore domain flag for obtaining domain info. Signed-off-by: Juergen Gross <jgross@suse.com> --- tools/libxc/include/xenctrl.h | 2 +- tools/libxc/xc_domain.c | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-)