From: Ian Campbell Subject: Re: [PATCH 2/3] libxl: Change claim_mode from bool to int. Date: Thu, 9 May 2013 14:40:45 +0100 Message-ID: <1368106845.17285.137.camel@zakaz.uk.xensource.com> References: <1368038124-11745-1-git-send-email-konrad.wilk@oracle.com> <1368038124-11745-2-git-send-email-konrad.wilk@oracle.com> <1368087000.17285.84.camel@zakaz.uk.xensource.com> <20130509132300.GE7945@konrad-lan.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130509132300.GE7945@konrad-lan.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: George Dunlap , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, 2013-05-09 at 14:23 +0100, Konrad Rzeszutek Wilk wrote: > > > > > > if (!libxl_get_freecpus(ctx, &cpumap)) { > > > @@ -5911,7 +5911,7 @@ int main_claims(int argc, char **argv) > > > /* No options */ > > > } > > > > > > - if (!libxl_defbool_val(claim_mode)) > > > + if (!claim_mode) > > > fprintf(stderr, "claim_mode not enabled (see man xl.conf).\n"); > > > > You don't exit here? Like above I think it would be actually OK for it > > to just list the domains with claims of zero. > > Ian Jackson during the review suggested that it just print that warning > and continue on. And now that I am using I actually like the warning. It > reminds me that I forgot to enable or disable it. OK. > > > > FWIW It occurs to me now that this could have just been "xl list > > --claims/-c", but it's there now. > > I can certainly try to redo it. I think I tried it two weeks ago and ran > in the trouble of having to modify a bunch of extra print_* functions to > have the extra claim information. And also not being sure how to expose > it via the JSON or sxp. Not sure what you mean, main_claims just calls list_domains with claims==1, so main_list could call it with claims == some flag set by a command line option. WRT sxp -- you don't need to care, that is purely legacy and shouldn't be updated with new features . Not sure which JSON exposes this, but you should get the field for free due to using the IDL for this stuff > I can certainly rework this for Xen 4.4 ? Or for Xen 4.3 if you think > that George would be OK with that.