From: Ian Campbell Subject: Re: [PATCH xm/xl enhancements for vptm 5/6] make devid a libxl type Date: Tue, 25 Sep 2012 11:36:37 +0100 Message-ID: <1348569397.3452.180.camel@zakaz.uk.xensource.com> References: <505CBDFD.5070408@jhuapl.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <505CBDFD.5070408@jhuapl.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Matthew Fioravante Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-09-21 at 20:20 +0100, Matthew Fioravante wrote: > This fixes a bug in libxl where device ids are not initialized properly. > The devid field for each device is set to be an integer type which are > always initialized to 0. > > This makes the xl DEV-attach commands always fail to add more than one > device, because each time the device id is initialized to 0, when it > should be initialized to -1, which in the code will trigger a search for > free id. Which of the DEV-attach commands can be used to add more than one device? Where is the code to do the search? I had a look in the disk and network cases and couldn't find it. > diff --git a/tools/ocaml/libs/xs/xs.mli b/tools/ocaml/libs/xs/xs.mli > --- a/tools/ocaml/libs/xs/xs.mli > +++ b/tools/ocaml/libs/xs/xs.mli > @@ -27,6 +27,7 @@ exception Failed_to_connect > type perms = Xsraw.perms > > type domid = int > +type devid = int I can see why these were needed in the xl modules, but I don't see how this type can be required in the xenstore ones. Ian.