From: Ian Campbell Subject: Re: [PATCH, v2] libxl: sane disk backend selection and validation Date: Wed, 20 Jul 2011 13:51:46 +0100 Message-ID: <1311166306.20648.192.camel@zakaz.uk.xensource.com> References: <19988.31275.221429.48662@mariner.uk.xensource.com> <1309967359.634.183.camel@zakaz.uk.xensource.com> <19988.34830.646646.818359@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19988.34830.646646.818359@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2011-07-06 at 17:06 +0100, Ian Jackson wrote: > diff -r d5dfaa568441 tools/libxl/libxl_device.c > --- a/tools/libxl/libxl_device.c Wed Jul 06 16:32:16 2011 +0100 > +++ b/tools/libxl/libxl_device.c Wed Jul 06 17:03:06 2011 +0100 > @@ -116,6 +116,122 @@ retry_transaction: > rc = 0; > out: > return rc; > +} > + > +typedef struct { > + libxl__gc *gc; > + libxl_device_disk *disk; > + struct stat stab; > +} disk_try_backend_args; > + > +static int disk_try_backend(disk_try_backend_args *a, > + libxl_disk_backend backend) { I just noticed this, and out of curiosity rather than thinking it should change, is there a reason to avoid returning enum types for functions? Ian.