From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [OPW PATCH] tools/xl: Call init function for libxl_bitmap Date: Mon, 20 Oct 2014 16:23:26 +0100 Message-ID: <20141020152326.GH19994@zion.uk.xensource.com> References: <5443cfde.0286440a.434c.1100@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5443cfde.0286440a.434c.1100@mx.google.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: Uma Sharma Cc: George.Dunlap@eu.citrix.com, Ian.Jackson@citrix.com, Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sun, Oct 19, 2014 at 08:21:01PM +0530, Uma Sharma wrote: > This patch calls init function for libxl_bitmap in > main_cpupoolnumasplit() and vcpuset() > tools/libxl/xl_cmdimpl.c > IDL generated libxl types should be used only after calling the init > function even if the variable is simply being passed by reference as > an output parameter to a libxl function > > Signed-off-by: Uma Sharma Acked-by: Wei Liu Presumably you're going to post a small series for your previous patch and this one. Please carry this tag over. > -- > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 988ee28..d68223f 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4843,7 +4843,8 @@ static void vcpuset(uint32_t domid, const char* nr_vcpus, int check_host) > char *endptr; > unsigned int max_vcpus, i; > libxl_bitmap cpumap; > - > + > + libxl_bitmap_init(&cpumap); > max_vcpus = strtoul(nr_vcpus, &endptr, 10); > if (nr_vcpus == endptr) { > fprintf(stderr, "Error: Invalid argument.\n"); > @@ -7254,7 +7255,8 @@ int main_cpupoolnumasplit(int argc, char **argv) > } > > ret = 0; > - > + > + libxl_bitmap_init(&cpumap); > poolinfo = libxl_list_cpupool(ctx, &n_pools); > if (!poolinfo) { > fprintf(stderr, "error getting cpupool info\n");