From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 4 of 4] xl: Add pci_assignable_add and remove commands Date: Fri, 11 May 2012 12:13:07 +0100 Message-ID: <4FACF443.5080002@eu.citrix.com> References: <1336649508.7098.97.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1336649508.7098.97.camel@zakaz.uk.xensource.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: Ian Campbell Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >> + >> +static void pciassignable_remove(const char *bdf, int rebind) >> +{ >> + libxl_device_pci pcidev; >> + XLU_Config *config; >> + >> + memset(&pcidev, 0x00, sizeof(pcidev)); > libxl_device_pci_init also. > > You are also missing the xlu_cfg_destroy both here and in the add fn. > > (it's a bit annoying that an XLU_COnfig is needed for these simple > helper functions, I suppose it's for logging, but maybe they could log > to stderr if cfg==NULL. Anyway, lets not fix that here) Hmm -- I just copied and pasted from pciattach() and friends. I'll fix those up while I'm at it. -George